Objective. Ureteropelvic junction obstruction (UPJO) represents to a leading cause of fetal hydronephrosis, which is associated with urinary tract infection (UTI) and urinary stone disease. This study is aimed at investigating risk factors of UTI in pediatric patients with UPJO after primary unilateral pyeloplasty. Methods. The records of a consecutive series of patients undergoing primary pyeloplasty at a single institution between June 2015 and November 2021 were retrospectively reviewed. Demographic and clinical characteristics, including age, gender, weight, height, body mass index (BMI), creatinine (Cr), blood urea nitrogen (BUN), estimated glomerular filtration rate (eGFR), neutrophil ratio, lymphocyte ratio, neutrophil/lymphocyte ratio, renal pelvis anteroposterior diameter (APD), renal cortex thickness, caliectasis, open or laparoscopic pyeloplasty, and internal drainage or external drainage, were collected and analyzed. The incidence of postoperative UTI and its risk factors was analyzed. Results. A total of 504 patients were enrolled in the study, and they were classified into the UTI group (
n
=
188
) and non-UTI group (
n
=
361
). Univariate analysis of the incidence of UTI revealed that age, gender, weight, height, BMI, surgical modality, Cr level, BUN level, neutrophil ratio, lymphocyte ratio and neutrophil/lymphocyte ratio, renal cortex thickness, and postoperative drainage modality were associated with UTI incidence after pyeloplasty in pediatric patients with UPJO. Multivariate analysis revealed that male gender, <19 months,
weight
<
11.5
(kg),
height
<
83
(cm),
BMI
<
17.09
,
BUN
>
4.08
(mmol/L), and internal drainage were risk factors of postoperative UTI in pediatric patients with UPJO. Conclusion. Our study demonstrated that male gender, <19 months,
weight
<
11.5
(kg),
height
<
83
(cm),
BMI
<
17.09
,
BUN
>
4.08
(mmol/L), and internal drainage were risk factors of UTI in pediatric patients with UPJO after primary unilateral pyeloplasty, which may provide reference for prophylactic antibiotics for those patients with risk factors.