ImportanceAlthough recent guidelines recommend against performance of preoperative urine culture before nongenitourinary surgery, many clinicians still order preoperative urine cultures and prescribe antibiotics for treatment of asymptomatic bacteriuria in an effort to reduce infection risk.ObjectiveTo assess the association between preoperative urine culture testing and postoperative urinary tract infection (UTI) or surgical site infection (SSI), independent of baseline patient characteristics or type of surgery.Design, Setting, and ParticipantsThis cohort study analyzed surgical procedures performed from January 1, 2017, to December 31, 2019, at any of 112 US Department of Veterans Affairs (VA) medical centers. The cohort comprised VA enrollees who underwent major elective noncardiac, nonurological operations. Machine learning and inverse probability of treatment weighting (IPTW) were used to balance the characteristics between those who did and did not undergo a urine culture. Data analyses were performed between January 2023 and January 2024.ExposuresPerformance of urine culture within 30 days prior to surgery.Main Outcomes and MeasuresThe 2 main outcomes were UTI and SSI occurring within 30 days after surgery. Weighted logistic regression was used to estimate odds ratios (ORs) for postoperative infection based on treatment status.ResultsA total of 250 389 VA enrollees who underwent 288 858 surgical procedures were included, with 88.9% (256 753) of surgical procedures received by males and 48.9% (141 340) received by patients 65 years or older. Baseline characteristics were well balanced among treatment groups after applying IPTW weights. Preoperative urine culture was performed for 10.5% of surgical procedures (30 384 of 288 858). The IPTW analysis found that preoperative urine culture was not associated with SSI (adjusted OR [AOR], 0.99; 95% CI, 0.90-1.10) or postoperative UTI (AOR, 1.18; 95% CI, 0.98-1.40). In analyses limited to orthopedic surgery and neurosurgery as a proxy for prosthetic implants, the adjusted risks for UTI and SSI were also not associated with preoperative urine culture performance.Conclusions and RelevanceThis cohort study found no association between performance of a preoperative urine culture and lower risk of postoperative UTI or SSI. The results support the deimplementation of urine cultures and associated antibiotic treatment prior to surgery, even when using prosthetic implants.