Converting CO2 into chemicals with electricity generated by renewable energy is a promising way to achieve the goal of carbon neutrality.Carbon-based materials have the advantages of low cost,wide sources and environmental friendliness.In this work,we prepared a series of boron-doped covalent triazine frameworks and found that boron doping can significantly improve the CO selectivity up to 91.2% in the CO2 electroreduction reactions(CO2RR).The effect of different doping ratios on the activity by adjusting the proportion of doped atoms was systematically investigated.This work proves that the doping modification of non-metallic materials is a very effective way to improve their activity,and also lays a foundation for the study of other element doping in the coming future.