Objective The primary objective of this study was to assess the potential of artificial intelligence techniques, in conjunction with transthoracic echocardiography (TEE) examinations, to forecast postoperative mortality outcomes in patients undergoing moderate-to-high-risk noncardiac surgeries. Methods This is a second retrospective analysis using the BioStudies public database. This dataset includes data from two medical centers. We partitioned the dataset utilizing a 7:3 ratio. This model seamlessly integrated diverse algorithms, encompassing both machine learning and deep learning methodologies such as logistic regression, gradient boosting decision tree, XGBoost, LightGBM, CatBoost, linear support vector classification, multilayer perceptron classifier, Gaussian Naive Bayes, Adaboost, recurrent neural network, convolutional neural network, Bayesian neural network, and probabilistic Bayesian neural network. To thoroughly evaluate the model's performance, we employed multiple metrics, including the receiver operating characteristic curve, accuracy, precision, F1 score, recall, calibration curve, and clinical decision curve. Results The present study included a total of 1453 patients. The Gbdt algorithm ranks the variable importance, and the top five important results are creatinine (Cr), creatinine exceeding twice the upper limit (Cr > 2), creatinine clearance, left ventricular end-diastolic internal diameter, and hemoglobin. Among these algorithms, only Gbdt algorithm yielded satisfactory results both in the training and test groups. In the training group, Gbdt had an area under the curve (AUC) value of 0.904, accuracy of 0.984, and precision of 1; In the testing group, Gbdt had an AUC value of 0.835, accuracy of 0.984, and precision of 0.5. However, the Gbdt algorithm demonstrated suboptimal performance in terms of recall rate and F1 score. Finally, we successfully developed an online intelligent prediction webpage that utilizes the Gbdt algorithm and TEE. Conclusions Gbdt represents an optimal approach for predicting postoperative mortality among patients undergoing non-cardiac surgery with moderate-to-high risk.