In our hospital, adherence to the guidelines for peri-operative antimicrobial prophylaxis (PAP) is suboptimal, with overly long courses being common. This practice does not offer any incremental benefit, and it only adds to the burden of antimicrobial consumption, promotes the emergence of antimicrobial resistance, and it is associated with adverse events. Our objective was to study the effect of an electronic reminder on the adherence to each element of PAP after cardiac surgery. We conducted a single center, before and after intervention, prospective cohort study from 1 June 2014 to 30 September 2017. The intervention consisted of a reminder of the hospital guidelines when ordering PAP through the hospital information system. The primary outcome was adherence to the suggested duration of PAP, while secondary outcomes included adherence to the other elements of PAP and incidence of surgical site infections (SSI). We have studied 1080 operations (400 pre-intervention and 680 post-intervention). Adherence to the appropriate duration of PAP increased significantly after the intervention [PRE 4.0% (16/399) vs. POST 15.4% (105/680), chi-square p < 0.001]; however, it remained inappropriately low. Factors associated with inappropriate duration of PAP were pre-operative hospitalization for <3 days, and duration of operation >4 h, while there were significant differences between the chief surgeons. Unexpectedly, the rate of SSIs increased significantly during the study (PRE 2.8% (11/400) vs. POST 5.9% (40/680), chi-square p < 0.019). The implemented intervention achieved a relative increase in adherence to the guideline-recommended PAP duration; however, adherence was still unacceptably low and further efforts to improve adherence are needed.