This study aimed to identify risk factors associated with infections after Transrectal ultrasound-guided prostate biopsy (TRUSPB) and to analyze the efficacy of preoperative prophylactic antimicrobial administration. A retrospective analysis was conducted on 766 patients who underwent TRUSPB at our hospital from January 2020 to January 2023. Among them, 450 patients were given a three-day prophylactic course of antimicrobial fluoroquinolones before TRUSPB (Group A), while the remaining 316 patients were administered a single dose of 750 mg oral ciprofloxacin 1 h before TRUSPB (Group B). We calculated the incidence of post-TRUSPB infections in both groups and employed a binary logistic regression model to analyze factors influencing post-TRUSPB infections and evaluate the effectiveness of prophylactic antimicrobial use. Among the 766 patients who underwent prostate biopsy, 62 cases (8.1%) developed post-TRUSPB infections, and there was no statistically significant difference in the rate of post-TRUSPB infections and types of infections between Group A and Group B. Blood and urine cultures from all the 62 infected patients were positive, with Escherichia coli being the most commonly detected pathogen, demonstrating a positive detection rate of 100.0% and accounting for 76% of all infections. Logistic regression analysis identified age (Odds ratio (OR) = 1.15, 95% Confidence Interval (CI) 1.05-1.25), a history of diabetes mellitus (OR = 1.31, 95% CI 1.12-1.52), and history of indwelling urinary catheter within 7 days before biopsy (OR = 1.43, 95% CI 1.15-1.77) as risk factors for post-TRUSPB infections. In summary, a single application of ciprofloxacin demonstrated similar efficacy in reducing the risk of post-TRUSPB infection compared to a three-day course of oral fluoroquinolones before biopsy while also reducing the risk of quinolone resistance. Conversely, advanced age, comorbid diabetes mellitus, and a 7-day history of indwelling urinary catheter before TRUSPB increased the risk of post-TRUSPB infection.