The study developed and validated a predictive model for anesthesia-related adverse events (ARAEs) in patients receiving a combination of propofol and remimazolam tosilate based on perioperative indicators. A retrospective analysis included 312 hospital patients from January 2021 to December 2024, with a training set (n=218, 70%) and a validation set (n=94, 30%). Independent risk factors for ARAE were duration of surgery, intraoperative hypotension, recovery time of spontaneous breathing, serum creatinine, and partial pressure of arterial carbon dioxide (all P < 0.05). Among the machine learning models, random forest (RF) performed best with an AUC of 0.814 (95% CI: 0.738–0.889) in the training set and an AUC of 0.777 (95% CI: 0.640–0.913) in the validation set. The model showed good calibration and clinical benefit according to DCA. The most important predictors were the duration of the operation and the anesthetic dosage ratio. The RF model effectively predicts the risk of ARAE with this anesthesia.