Along with the cathode, anode, and liquid electrolyte in lithium-based secondary batteries, the separator is a crucial element for guaranteeing battery safety. However, conventional polyolefin separators suffer from inherent drawbacks such as inadequate compatibility with electrolytes and limited thermal stability. These limitations can lead to issues like high-temperature shrinkage, melting, and even combustion. Moreover, the vulnerability of separators toward lithium dendrite penetration exacerbates safety concerns associated with lithium-ion batteries. Hence, the design of high safety separators is currently a focus and challenge. In this study, we develop a multifunctional polymer-coupled nanofiber membrane by an electrospinning method that addresses the above issue as a separator of lithium metal battery. The nanofiber coating contains carbonyl oxygen, pyrrole nitrogen, and cross-linked networks with tertiary amine groups. These components effectively neutralize acidic compounds generated during the liquid electrolyte side reaction. X-ray micro-computed tomography analysis verifies the exceptional structural stability of the new separator, maintaining its 3D skeleton even after 2000 h of cycling. The nanofiber separator in a full Li||NCM811 cell achieves a high specific capacity of 136.6 mA h g−1 at 0.9 A g−1 and displays outstanding long-cycle stability over 500 cycles with a capacity retention of 88.5%.