The sp3/sp2 ratio present in boron‐doped diamond (BDD) electrodes conditions the way in which organic compounds are oxidized and transformed to CO2 during anodic oxidation. A higher content of sp3 carbon on the surface favors the generation of hydroxyl radicals over the oxygen evolution reaction, which generates different degradation byproducts. In this work, we studied the degradation of aniline by anodic oxidation using five BDD electrodes with different sp3/sp2 ratios in sulfate and chloride media. Aniline was degraded using the five BDD electrodes in both electrolytes, and clear differences were observed in the intermediates produced during the electrolysis. BDD electrodes with higher sp3 proportions allowed for greater degradation and mineralization of aniline with lower molecular weight and the production of fewer toxic organic byproducts. Degradation pathways for aniline in sulfate and chloride media are proposed, evidencing the differences in the oxidation mechanisms for aniline and its byproducts due to the varying sp3/sp2 ratio in the BDD electrodes.