In this work, graphitic carbon nitride (g-C 3 N 4 ) was doped with boron by thermal treatment with NaBH 4 . We have shown that the morphology of the modified polymer gradually changes from graphitic-like to amorphous, with increasing amounts of NaBH 4 used for annealing. On the other hand, the boron doping has a very small influence on the band gap energy, as well as on the positions of the valence and conduction band edges of the polymer, but strongly improves the activity of g-C 3 N 4 in the photocatalytic reduction of oxygen and degradation of methyl orange (8-fold increase of the degradation rate constant with respect to that of pure g-C 3 N 4 ). The enhancement of the photocatalytic properties was explained by the increased rate of charge transport, both in the polymer plane and across the film, due to formation of N−B−N bonds between the adjacent heptazine units and the interlayer Coulomb interactions. The best photocatalytic activity was obtained for samples prepared from a mixture of g-C 3 N 4 and NaBH 4 at a moderate weight ratio (4:1), while increased amounts of NaBH 4 led to significant and unfavorable changes in both the morphology and molecular structure of the polymer.