Anisotropic lens-shaped nitrogen-doped carbon (Lens-NMC) with unidirectionally aligned mesopores was achieved via perpendicular block copolymer self-assembly at the polymer interface. Lens-NMC is applied as a potassium-ion battery anode material as a next-generation battery system. Anisotropic lens-shaped nitrogen-doped carbon (Lens-NMC) with unidirectionally aligned mesopores was achieved via perpendicular block copolymer self-assembly at the polymer interface.