The realization of carbon and nitrogen cycles is an urgent requirement for the development of human society, and is also a hot research topic in the field of catalysis. Electrocatalysis driven by renewable energy has attracted considerable attention, and the target products can be obtained by varying the applied potentials. Accordingly, electrocatalysis is considered to be an effective strategy to alleviate the current energy crisis and environmental problems and is of great significance in realizing carbon neutrality. Electrocatalytic CO2 reduction reaction (CO2RR) and N2 reduction reaction (N2RR) are also promising strategies for the conversion of small molecules. However, the high dissociation energies of the C=O and N≡N bonds in the linear molecules of CO2 and N2, respectively, lead to their high chemical inactivity. In addition, the large energy gap between the highest occupied molecular orbital (HOMO) and the lowest unoccupied molecular orbital (LUMO) further results in high chemical stability. Besides, the low proton affinity of CO2 and N2 makes direct protonated difficult. However, because of the similar redox potentials of CO2RR, N2RR, and hydrogen evolution reaction (HER), HER competes with CO2RR and N2RR, affecting the CO2RR and N2RR performance. Therefore, both CO2RR and N2RR still face challenges, such as high overpotential and low Faradaic efficiency. To overcome these bottlenecks, considerable efforts have been made to improve the performance of the CO2RR and N2RR electrocatalysts. The electrocatalytic process primarily occurs on the catalyst surface and involves mass diffusion and electron transfer; thus, the performance of the catalysts is closely related to their mass and electron transfer abilities. Modulating the catalyst surface structure can regulate the mass and electron transfer behavior of the active sites during the electrocatalytic process. Defect and interface engineering of electrocatalysts is important for enhancing the adsorption of gas, inhibiting HER, enriching the gas, stabilizing the intermediates, and modifying the electronic structure by engineering the surface atoms. To date, various defective and composite electrocatalysts have shown great potential to enhance the CO2RR and N2RR performance. Herein, recent advances in defect and interface engineering for CO2RR and N2RR are reviewed. The effects of four different defects (vacancy, high-index facet, lattice stain, and lattice disorder) on the CO2RR and N2RR performance are discussed. Then, the main roles of interface engineering of polymer-inorganic composite catalysts are further reviewed, and representative examples are presented. Finally, the opportunities and challenges for defect and interface engineering in the electroreduction of CO2 and N2 are also proposed, suggesting directions for the future development of highly efficient CO2RR and N2RR catalysts.