Positive surgical margin (PSM) or apical positive surgical margin (APSM) is an established predictive factor of biochemical recurrence or disease progression in prostate cancer (PCa) patients after radical prostatectomy. Since there are limited usable magnetic resonance imaging (MRI)-based models, we sought to explore the role of three-dimensional (3D) visualization for preoperative MRI in the prediction of PSM or APSM. From December 2016 to April 2022, 149 consecutive PCa patients who underwent radical prostatectomy were retrospectively selected from the Second Affiliated Hospital of Dalian Medical University. According to the presence of PSM or APSM, patients were divided into a PSM group (n=41) and a without PSM group (n=108) and into an APSM group (n=33) and a without APSM group (n=116). Twenty-one parameters, including prostate apical shape, PCa distance to the membranous urethra, and pubic angle, were measured on 3D visualization of MRI. The development of the nomogram models was built by the findings of multivariate logistic regression analysis for significant factors. To predict the probability of PSM, a longer PCa distance to the membranous urethra (OR=0.136, p=0.019) and the distance from the anterior peritoneum to the anterior border of the coccyx (work space AP, OR=0.240, p=0.030) were independent protective factors, while a type 3 prostate apical shape (OR=8.262, p=0.025) and larger pubic angle 2 (OR=5.303, p=0.029) were identified as independent risk factors. The nomogram model presented an area under the curve (AUC) of the receiver operating characteristic curve (ROC) of PSM of 0.777. In evaluating the incidence of APSM, we found that the distance to the membranous urethra (OR=0.135, p=0.014) was associated with a low risk of APSM, while larger pubic angle 1 (OR=4.666, p=0.043) was connected to a higher risk of APSM. The nomogram model showed that the AUC of APSM was 0.755. As 3D visualization for preoperative MRI showed good performance in predicting PSM or APSM, the tool might be potentially valuable, which also needs to be validated by multicenter, large-scale, prospective studies.