A space-confined strategy has been used to control the pyrolysis of two-dimensional (2D) NiCo-MOF@ZIF-L(Zn). A thin SiO2 layer as a confined space could avoid the destruction of the 2D morphology during pyrolysis and expose more active sites. The obtained NiCo-NC material exhibits high ORR and Zn-air battery performance.