Background: Antibiotic prophylaxis is one of the major approaches to prevent surgical site infection. Despite the availability of international guidelines on it, the practice of antibiotic prophylaxis is still far from optimal. This study aimed to assess the impact of guideline implementation on the rational use of prophylactic antibiotics and its cost-saving effect in gastrointestinal surgery by clinical pharmacist intervention. Methods: A pre and post intervention study was carried out between October 2017 and June 2018 on patients who underwent gastrointestinal surgery in a major referral teaching hospital in Shiraz, southern Iran. The intervention phase consisted of revising the institutional guidelines for surgical antimicrobial prophylaxis, assigning a clinical pharmacist to the surgical department, and arranging several meetings with the surgical department regarding the appropriate utilization of antibiotics. Differences in antibiotic utilization in patients before and after the intervention phase were compared. Exposures were surgical antimicrobial prophylaxis timing and agents, and main outcomes were incidence of surgical site infection and length of hospital stay. Results: A total of 430 patients were included in the post intervention phase, while 445 patients were included in the baseline evaluation. Promoting appropriate antibiotic use in the post intervention group had the potential to decrease medication costs by reducing unnecessary prescriptions and duration of antibiotic usage (P<0.001). In the pre intervention group, the mean cost of antibiotic prescriptions was 11.5 times that of the post intervention group. Mean hospitalization in the pre intervention group was greater than the post intervention group (P<0.001). Furthermore, our data revealed that the rate of postsurgery infection in the post intervention group was 3.03%, while this rate was 6.76% in the preintervention group (P=0.01). Conclusion: This study provides evidence that adherence to surgical antimicrobial prophylaxis guidelines increased the rational use of prophylactic antibiotics, with substantial cost savings in patients who underwent surgery.