The lithium-sulfur (Li–S) battery is a promising alternative to overcome capacity and specific energy limitations of common lithium-ion batteries. Highly porous, nitrogen-doped carbons as conductive host structures for sulfur/lithium sulfide deposition are shown herein to play a critical role in reversible cycling at low electrolyte/sulfur ratio. The pore geometry is precisely controlled by an efficient, scalable ZnO hard templating process. By using an electrolyte volume as low as 4 µL mg-1 S, the beneficial nitrogen functionality leads to a twofold increased cell lifetime turning our findings highly favorable for real applications. Stable cycling of up to 156 cycles (59 cycles with undoped carbon) with high sulfur loadings of 3 mg cm-2 is achieved. Operando X-ray diffraction measurements during cycling show the transformation pathway of the sulfur – polysulfide – Li2S species. The observed intermediates critically depend on the nitrogen doping in the cathode carbon matrix. Nitrogen-doped carbons facilitate polysulfide adsorption promoting the nucleation of crystalline Li2S. These results provide new insights into the significant role of heteroatom doping for carbons in Li-S batteries with high specific energy.