Environmental pollution and energy deficiency are two key issues for the sustainable development of the modern society. Polyurethane foam is a typical commercial polymer with a large production quantity and its waste needs to be recycled. Lithium–sulfur battery is a promising energy-storage device with high energy density and low cost, but its demerits such as poor conductivity of the sulfur and severe capacity degradation due to the soluble lithium polysulfides are still a big challenge. This work reports a facile method to prepare nitrogen-doped porous carbon (NPC) from the polyurethane foam (PUF) waste and use it as a reservoir to impregnate sulfur for lithium–sulfur batteries. The obtained NPC has a unique interconnected sheet-like porous morphology with a large surface area of 1315 m2 g−1. The NPC-S composite delivers a large reversible capacity of 1118 mAh g−1 with good cycling performances and excellent high-rate capabilities. A large reversible capacity of 460 mAh g−1 can be retained at a large current of 5C (8.35 A g−1) after 100 cycles.