Background Preoperative imatinib mesylate therapy for gastrointestinal stromal tumors (GISTs) is controversial. This study aimed to explore the clinical efficacy and optimal duration of preoperative imatinib mesylate (IM) therapy in patients with locally advanced and recurrent/metastatic GISTs. Methods We retrospectively examined patients who received preoperative imatinib mesylate therapy from January 2013 to December 2018 at Xiangya Hospital, Central South University and the Second Xiangya Hospital of Central South University, China. Clinical data, including the results of tests for mutations in KIT and PDGFR, findings from regularly conducted re-examinations, abdominal enhanced computed tomography/magnetic resonance imaging data, responses to imatinib, progression-free survival and overall cancer-specific survival, were recorded. Results A total of 25 patients were enrolled in our study, including 18 with a locally advanced GIST and 7 with recurrent or metastatic GISTs. Their ages ranged from 22 to 70 years (M:F = 1.6:0.9), with a mean age of 50.48±12.51 years. The tumor locations included the stomach (56.0%), rectum (16.0%), enterocoelic/retroperitoneal sites (12.0%) and the small intestine (12.0%). Based on testing for mutations in KIT and PDGFR, 22 patients received 400 mg/d KIT, and 3 patients received 600 mg/d PDGFR. The median duration of preoperative IM therapy was 8.96±4.81 months, ranging from 3 to 26 months. According to the Choi criteria, 24 patients achieved a partial response (PR), and 1 patient had stable disease (SD). All patients underwent surgery after preoperative IM therapy, and no postoperative complications appeared. The 2-year PFS and 5-year PFS were 92% and 60%, respectively, and the total 5-year cancer-specific survival (CSS) was 92%. Conclusion Preoperative imatinib therapy is feasible for locally advanced and recurrent/metastatic GISTs and can effectively shrink the tumor size, allow organ sparing and avoid extensive organ resection. Moreover, the optimal duration of preoperative IM therapy in patients with locally advanced and recurrent/metastatic GISTs was 8.96±4.81 months, ranging from 3 to 26 months, and gastric GISTs had a better response to preoperative IM therapy than did non-gastric GISTs.