To effectively restrain the dissolution of soluble polysulfides and fully utilize the active sulfur materials in lithium-sulfur (Li-S) batteries, host materials with unique compositions and porous structures have been pursued. Herein, we have investigated the mechanism of the excellent activity of oxygenated g-C3N4 for Li-S batteries from theoretical perspective, and the further experiment confirms that our O-g-C3N4-S cathode exhibits much better electrochemical performance compared with those in previous reports. Our DFT calculations reveal that the oxygenated material has better electrical conductivity and stronger adsorption ability with the Li2Sx species compared with the pristine g-C3N4 and other two-dimensional (2D) materials. Furthermore, we have confirmed experimentally that the O-g-C3N4-S composite cathode exhibits excellent electrochemical performance in Li-S batteries with high reversible discharge capacity of 1030 mAh g−1 after 100 cycles at 0.2 C, great rate capability with the discharge capacity of 364 mAh g−1 even at 5.0 C, and outstanding long-term cyclic stability with the discharge capacity of 465 mAh g−1 after 1000 cycles at 1.0 C (capacity decay was only 0.046% per cycle). Our results also suggest that theoretical study will play a significant role in predicting and screening novel materials with better performance.