Electronic modulation on catalysts is vital to improve the efficiency of electrochemical CO2 reduction reactions (CO2RR). Herein, CoxNi1−x nanoalloys supported by N-doped carbon nanofibers (CoxNi1−x/N-C NFs) are constructed and regulated via facile electrospinning procedures followed by pyrolysis, to efficiently catalyze CO2 reduction toward CO. The modulated electronic configuration is experimentally and theoretically evidenced in CoxNi1−x along with varied composition and interactions. The d-band center up-shifts with increasing Co in CoxNi1−x nanoalloys, leading to obvious variation in the binding energy of key intermediates (*COOH, *CO and *H, * denotes a surface active site) and the reaction free energy (△G). Among the CoxNi1−x, the Co0.75Ni0.25 features the lowest △G (positive) to generate *COOH and desorb *CO, and the highly negative △G*H, indicating the promoted CO2RR but prohibited hydrogen evolution. As expected, the optimal Co0.75Ni0.25/N-C NFs afford a high CO Faradaic efficiency of 85.0% and a current density of −13.4 mA cm−2 at −0.9 V vs. RHE in 0.5 M NaHCO3, performing at the high-level of noble-metal-free electrocatalysts. Elucidating efficient electrocatalysis over well-tailored alloys, our work will open up new opportunities for exploring high-performance materials used in sustainable energy conversion.