To address the issues of electrode passivation and high electric energy consumption (EEC) associated with the removal of antibiotic wastewater using traditional direct current electrocatalytic oxidation (DCEO) with Boron-Doped Diamond (BDD) electrodes, this study aims to develop an efficient, low-cost, and self-cleaning BDD electrode pulsed alternating electrocatalytic oxidation (BDD-PAEO) technology. The experimental findings demonstrated that, under optimal conditions, the BDD-PAEO mode achieved a 99.9% removal efficiency for sulfamethazine (SMZ). Furthermore, the removal efficiency of COD in the BDD-PAEO mode consistently remained above 93% in 10 experimental cycles. Compared with the BDD-DCEO mode, the EEC of the BDD-PAEO mode is reduced by 17.39%, and the current efficiency (CE) is increased by 47.15%. The ·OH was confirmed to be the main active oxidant species for degradation of SMZ by free radical quenching experiments, electron paramagnetic resonance (EPR) and three-dimensional excitation-emission matrix (3D-EEM) spectroscopy. The degradation pathway of SMZ was revealed by density functional theory (DFT) calculation and gas chromatography-mass spectrometry (GC-MS) analysis. Toxicity estimation illustrated that BDD-PAEO technology can effectively reduce the toxicity of wastewater after SMZ degradation. This study shows BDD-PAEO technology's high potential for efficient SMZ degradation and toxicity reduction in antibiotic wastewater, offering a novel treatment solution.