Objective To compare the value of 3.0T magnetic resonance imaging (MRI) and transrectal ultrasonography(TRUS) in preoperative diagnosis of anal fistula.Methods A total of 100 patients undergoing elective anal fistula surgery admitted to Shangrao People′s Hospital from February 2018 to September 2020 were selected as the research objects.All patients underwent 3.0T MRI and TRUS examination, the surgical results were taken as the gold standard,the consistency of the diagnostic coincidence rate of MRI and TRUS in preoperative diagnosis of anal fistula, detection of anal fistula typing and with the surgical results was compared.Results Diagnosed by the results of surgery, among 100 patients with anal fistula, 62 cases were intersphincteric fistulas, 29 cases were transsphincteric fistulas, 4 cases were suprasphincteric fistulas, and 5 cases were external sphincteric fistulas; there were 104 main ducts, 92 branch ducts, and 152 internal opening; 60 abscesses.The detection coincidence rate of main ducts, branch ducts and internal opening of MRI examination was higher than that of TRUS examination, the differences were significant statistically (P<0.05).There was no statistically significant difference in the coincidence rate of abscesses between the two examinations (P>0.05).The accuracy of MRI diagnosis of anal fistula classification was 96.00% (96/100), higher than 86.00%(86/100)of TRUS,the difference was significant statistically(P<0.05).According to Kappa consistency measure, the consistency between MRI diagnosis of anal fistula classification and surgical results was (Kappa=0.925, P=0.000),which was higher than that of TRUS diagnosis (Kappa=0.739, P=0.000).Conclusion 3.0T MRI has high accuracy and no damage in preoperative detection and evaluation of patients with anal fistula.TRUS also has high accuracy, fast inspection and easy operation.The accuracy of MRI is higher than that of TRUS, but the rapidity and simplicity of MRI is weaker than that of the TRUS, it is necessary to select or combine them according to the situation, which can accurately evaluate the operation, improve the cure rate and reduce the recurrence rate.