Porous carbon materials with superior performance and low-cost have emerged as the preferred sulfur host materials in lithium-sulfur batteries, however, utilizing cheap raw materials to achieve large-scale preparation still faces great challenge. In this study, porous carbon materials were synthesized using abundant high sulfur coal as the feedstock and magnesium oxide and potassium hydroxide bothas templates and activators. The study delved into the investigation of structure-activity relationship of these materials when employed assulfur host materials in lithium sulfur batteries. It is observed that mesoporous (constituting 74%) are predominantly generated due to thetemplating action of MgO. KOH serves as an active agent primarily responsible for the formation of micropores ( constituting 72%).The combined use of MgO and KOH leads to the creation of carbon material, PCMgO+KOH, characterized by large specific surface area(1 616 m2 / g),high pore volume (1.02 m3 / g),and rich pore structure (54% mesoporous and 46% microporous). The results of electrochemical performance test show that the S@ PCMgO+KOH has good rate performance and excellent cycle stability. After 500 cycles of chargingang discharging at 1 C, it can still retain 553.2 mAh/ g, with a capacity retention rate of 65.5% and a decay rate of only 0.075% per cycle, demonstrating good rate performance and excellent cycling stability. The excellent electrochemical properties of PCMgO+KOH can be attributed mainly to its low ohmic resistance and charge transfer resistance, rapid polysulfide redox reaction kinetics, and exceptional capability in binding lithium polysulfide. This study provides an alternative route for the preparation of low-cost and high-performance host materials for lithium-sulfur batteries.