To identify prognostic factors for complete anatomical success (CAS) under different axial length (AL) conditions after vitrectomy plus internal limiting membrane (ILM) peeling for retinal detachment associated with macular hole (MHRD). This retrospective study included 243 patients (251 eyes) with MHRD who underwent primary vitrectomy plus ILM peeling. Multivariate logistic regression explored prognostic factors for CAS in AL <30 mm and ≥ 30 mm groups. Overall, 113 eyes (45.0% of 251) exhibited complete CAS after initial surgery. Eyes with CAS had greater best-corrected visual acuity improvement than eyes without CAS (p < 0.001). CAS was more common in eyes with AL < 30 mm (50.3% of 155) than in eyes with AL ≥ 30 mm (36.5%, 35/96; p = 0.032). In the AL < 30 mm group, CAS was associated with ILM insertion (odds ratio [OR], 2.824, 95% confidence interval [CI], 1.189-6.710; p = 0.019), silicone oil (SO)/perfluoropropane (C3F8) tamponade (SO: OR, 0.408, 95% CI, 0.191-0.873; C3F8: OR, 2.448, 95% CI, 1.145-5.234; p = 0.021) and staphyloma (OR, 0.318, 95% CI, 0.143-0.707; p = 0.005). In the AL ≥30 mm group, CAS was associated with ILM insertion (OR, 11.621, 95% CI, 2.557-52.813; p = 0.001), SO /C3F8 tamponade (SO: OR, 5.305, 95% CI, 1.206-23.334; C3F8: OR, 0.188, 95% CI, 0.043-0.829; p = 0.027) and age (OR, 0.928, 95% CI, 0.876-0.983; p = 0.011). Vitrectomy plus ILM peeling can effectively treat MHRD but has limited efficacy in eyes with AL ≥ 30 mm. ILM insertion was associated with more frequent CAS at any AL. C3F8 tamponade yielded better outcomes with AL < 30 mm; SO tamponade yielded better outcomes with AL ≥ 30 mm.