Graphitic carbon nitride g‐C3N4 (GCN) has attracted extensive attention for electrochemical energy storage and conversion due to its high surface area, metal‐free characteristics, “earth‐abundance,” and facile synthesis. Furthermore, GCN has been demonstrated to exhibit a chemical interaction with polysulfides because of functional pyridinic nitrogen atoms, thus representing promising properties for application in lithium–sulfur (Li–S) batteries. Herein, an oxygen‐doped hexagonal tubular carbon nitride (O‐TCN) is obtained through a simple hydrolysis and pyrolysis approach. The tubular structure favors electrolyte infiltration and accommodates the volume change of sulfur during the redox reaction. Moreover, O‐TCN/S with a high content of pyridinic N of about 80 wt% as the sulfur host is beneficial for trapping various polysulfide intermediates via numerous strong N–Li chemical interactions, further facilitating the transformation from high‐order polysulfides to low‐order Li2S2 or Li2S. As a result, O‐TCN delivers a high discharge capacity of 1281 mAh·g−1 at 0.05 C for the first cycle, and an excellent reversible capacity of 401 mAh g−1 after 1000 cycles at 0.5 C with an ultralow capacity decay of 0.064% per cycle, presenting a high sulfur utilization and capacity retention.