Developing bismuth-carbon composites that can alleviate the stress concentration and volume expansion problems during the Bi/BiOCl conversion reaction is crucial for electrochemical desalination, especially Cl− removal technology, but it is still a great challenge. Here, we report a B/N co-doped bismuth encapsulated in carbon tubes. Using CAU-17 as a template, a carbon tubular material with multiple carbon layer structures was successfully synthesized by co-pyrolysis with BCN nanosheets, which achieved effective encapsulation of Bi. As the pyrolysis temperature increased, the continuous evaporation of Bi prompted the transformation of the carbon tube structure from a soft carbon to a hard carbon structure interconnected by multi-layered short graphene flakes. This alleviated the instability of the electrode caused by the volume expansion during the Bi/BiOCl transformation reaction and also provided additional ion storage capacity. When applied to the CDI dechlorination anode, Bi@BCN-900 exhibited a high desalination capacity of 145.96 mg g−1 and low energy consumption of 0.53 kWh kg−1 NaCl at an applied voltage of 1.2 V. Moreover, Bi@BCN-900 showed good stability over long-term cycling tests. This work expands the application of CAU-17 and offers new research insights for the design of bismuth-based materials for CDI dechlorination anodes.