Herein, composition-engineered CoFe nanoalloys were in-situ constructed and confined in porous fibrous carbon by electrospinning and controlled graphitization, resulting in (110) lattice space expansion and improved free-electron-migration in nanoalloys, delivering bimetallic synergy by electron structural optimization. Impressively, the reinforced NO3- adsorption and rapid desorption of NH3 over composition-engineered nanoalloys efficiently promote the electrocatalytic dynamic behavior. As a result, the optimal Co1Fe1.5/C affords an excellent NH3 yield of 48.2 ± 1.2 mg h-1 mgcat-1 and a maximum Faraday efficiency of 90.8 ± 1.5% at -1.1 V vs. RHE, with outstanding stability during 200 h NO3-RR, outperforming the most state-to-the-art catalysts. An excellent conversion of nitrate (96.4 ± 0.8%) with a high selectivity for ammonia (94.4±1.2%) can be validated. Detailed characterizations including in-situ XPS technique and theoretical calculation studies have demonstrated that Fe composition engineering reinforces the surface adsorption of NO3-, induces the surface electron redistribution of Co center, and optimizes the reaction pathways, resulting in the remarkable bimetallic synergy and enhancing the surface adsorption of a key intermediate of ⁎NO over Co sites during the NO3-RR. Finally, the Zn-NO3- battery assembled by Co1Fe1.5/C was explored, which further indicates the potential of Co1Fe1.5/C in the energy conversion device.