This study explores the mechanism, design, and application of machine learning in the sonoelectrochemical (US-EC) systems and select ibuprofen (IBP) as the target pollutant. Mechanism investigation shows that OH and S O4·- are the primary chemical oxidation species through scavenger experiments. Based on the heterogeneous nucleation mechanism, the electrodes in the ultrasound (US) system play the role of electrode-sonocataliytic and can promote the degradation kinetic constant of pharmaceutical pollutants. The effects of design parameters, including US frequency, voltage, electrolyte, electrode area, gap, and position on IBP degradation were investigated. The results demonstrated that under optimized parameters: US frequency of 35 kHz, voltage of 5 V, 0.1 M Na2SO4 electrolyte, 1.5 cm gap, and placement at P8, the US-EC system achieved a kinetic constant of 0.016 min−1. Chemiluminescence was used to visualize the spatial distribution of the oxidant, and provided theoretical support for mechanism and design parameter optimization. The eXtreme Gradient Boosting model was used to predict the kinetic constant of pharmaceutical contaminants including IBP, indicating excellent model performance with results of R2 and RMSE reaching 0.98 and 0.0005, respectively. SHapley Additive exPlanations was employed to assess the impact of design parameters on pharmaceutical pollutants degradation. The results showed that US frequency, US power, and the distance 'r' from the US transmitter to the anode have the most significant impact on the prediction performance of the model. Two sets of new experiments were verified using this model, and the prediction accuracy reached 76% and 82% respectively, demonstrating that machine learning can effectively predict the kinetic constants of pharmaceutical contaminants under complex factors affecting the US-EC system, assisting researchers in swiftly evaluating the system's pollutant treatment performance and simplifying the experimental workload.