The photocatalytic activity of g-C 3 N 4 can be enhanced by improving photoinduced carrier separation and exposing sufficient reactive sites. In this study, we synthesized B-doped porous tubular g-C 3 N 4 (BCNT) using a H 3 BO 3 -assisted supramolecular self-template method, wherein H 3 BO 3 helped in B-doping, building a porous structure, and maintaining one-dimensional nanotubes. The tubular structure had an ultrathin tube wall and large aspect ratio, which are conducive to the directional transmission and separation of photogenerated carriers; moreover, the abundant pore structure of the tube wall could fully expose the reactive sites. The introduction of B and the cyano group modulated the bandgap of g-C 3 N 4 and elevated the position of the conduction band, thus enhancing the photoreduction ability and effectively improving the hydrogen evolution performance. Consequently, the hydrogen evolution of 53.2 μmol•h −1 ) was 1.82 and 1.54 times that of ultrathin g-C 3 N 4 nanosheets (CNN, 121.3,34.6 μmol•h −1 ) under simulated sunlight and LED lamp irradiation, respectively. Thus, this work provides in-depth insights into the rational design of one-dimensional g-C 3 N 4 nanotubes with high hydrogen evolution activity under visible irradiation.