Graphitic carbon nitride (g-CN) materials exhibit attractive optoelectronic physical properties; however, their low photoluminescence quantum yields (PLQYs) limit their applications in luminescent devices. Here, boron-doped aromatic carbon nitride (B-PhCN x ) was synthesized for the first time via direct thermal polymerization of 2,4-diamino-6-phenyl-1,3,5-triazine and boric acid. The impact of B doping and phenyl modifying on the structural and optical characteristics of the samples was investigated in detail. The highest PLQY of 40.7% was achieved in B-PhCN 20 , which is 6.8 times that of pristine carbon nitride (p-CN). The B-PhCN 20 -based light-emitting diode demonstrates a maximum luminance of 1494 cd m -2 and a maximum external quantum efficiency of 1.03%, which are 3.5 and 4.9 times that of the p-CN-based device, respectively. Our findings will provide a reference for rationally designing low-cost and high-performance carbon-nitride-based optoelectronic devices.