Aim: Nephrolithiasis is one of the causes of urinary tract infection (UTI). In this study, we investigated risk factors for UTI in children with nephrolithiasis. Methods: The data from the patients with nephrolithiasis were evaluated in this retrospective follow-up study. Patients with a history of UTI before admission and congenital anomaly of kidney or urinary tract were excluded. The patients were divided into two groups: patients with UTI (recurrent UTI and single UTI) and patients without UTI. Results: A total of 599 patients were included in this study. UTI occurred in 181 (30.2%) patients. There was a positive association between the size of stone and UTI (odds ratio (OR): 1.355, P = 0.007). Receiver operating characteristic curve analysis showed that the cut-off value of the size of stone for UTI was 5.3 mm, with a sensitivity of 74.9% and a specificity of 66.1% (area under the curve: 0.572 AE 0.028, P = 0.013). The presence of a metabolic risk factor and age at diagnosis under 2 years were significantly associated with both UTI and recurrence of UTI (OR: 2.272, P = 0.021, OR: 1.809, P = 0.028, respectively, for metabolic risk factor; OR: 1.212, P = 0.041, OR: 1.122, P = 0.046, respectively, for age at diagnosis under 2 years). Hypercalciuria was significantly associated with the recurrence of UTI (OR: 1.854, P = 0.017). Conclusions: The age at diagnosis, the presence of a metabolic risk factor and size of stone are significant risk factors for UTI in children with nephrolithiasis. The patients with idiopathic hypercalciuria, metabolic risk factor and age at diagnosis under 2 years have increased risk of recurrence of UTI.