This study investigates the release of NH3 and nitrogen oxides (NOx) from wastewater into the air in relation to the variations in NH3-N, NO2–-N, NO3–-N, and chemical oxygen demand (COD) concentrations in the swine wastewater with/without electrolysis using boron-doped diamond (BDD), PbO2, and graphite anodes. The NH3 concentration in the air right above the swine wastewater without electrolysis increased over time and this increase was greater when the wastewater NH3-N concentration was higher. Electrolysis could reduce the release of NH3 from swine wastewater into the air. The NO concentration in the air was greater for the wastewater without electrolysis than for that with electrolysis but an opposite trend was observed for NO2, although the corresponding NOx concentrations for the wastewater with and without electrolysis were similar. Roughly, the air NH3, NO, NO2, or NOx concentrations for using the different anodes in wastewater electrolysis followed the order Nb/BDD >> graphite/BDD > graphite > graphite/PbO2 ≈ Ti/PbO2. Although the BDD and graphite anodes showed less formation of nitrite or nitrate than the PbO2 anodes, the graphite/BDD and graphite anodes had worse performance in NH3-N or COD electro-degradation than the other tested ones. When the initial concentration of NH3-N or COD was higher, its specific energy consumption in electrolysis was lower.