It aimed to analyze the value of deep learning algorithm combined with magnetic resonance imaging (MRI) in the risk diagnosis and prognosis of endometrial cancer (EC). Based on the deep learning convolutional neural network (CNN) architecture residual network with 101 layers (ResNet-101), spatial attention and channel attention modules were introduced to optimize the model. A retrospective collection of MRI image data from 210 EC patients was used for model segmentation and reconstruction, with 140 cases as the test set and 70 cases as the validation set. The performance was compared with traditional ResNet-101 model, ResNet-101 model based on spatial attention mechanism (SA-ResNet-101), and ResNet-101 model based on channel attention mechanism (CA-ResNet-101), using accuracy (AC), precision (PR), recall (RE), and F1 score as evaluation metrics. Among the 70 cases in the validation set, there were 45 cases of low-risk EC and 25 cases of high-risk EC. Using ROC curve analysis, it was found that the area under the curve (AUC) for the diagnosis of high-risk EC of the proposed model in this article (0.918) was visibly larger as against traditional ResNet-101 (0.613), SA-ResNet-101 (0.760), and CA-ResNet-101 models (0.758). The AC, PR, RE, and F1 values of the proposed model for the diagnosis of EC risk were visibly higher (P < 0.05). In the validation set, postoperative recurrence occurred in 13 cases and did not occur in 57 cases. Using ROC curve analysis, it was found that the AUC for postoperative recurrence prediction of the patients by the proposed model (0.926) was visibly larger as against traditional ResNet-101 (0.620), SA-ResNet-101 (0.729), and CA-ResNet-101 models (0.767). The AC, PR, RE, and F1 values of the proposed model for postoperative recurrence prediction were visibly higher (P < 0.05). The proposed model in this article, assisted by MRI, presented superior performance in diagnosing high-risk EC patients, with higher sensitivity (Sen) and specificity (Spe), and also demonstrated excellent predictive AC in postoperative recurrence prediction.