Perchlorate, nitrate, and thiocyanate are common thyroid disruptors in daily life and alter testosterone levels in animals. However, little is known about the effects of perchlorate, nitrate, and thiocyanate on serum total testosterone (TT) in the general population. The study was designed to assess the associations between urinary levels of perchlorate, nitrate, and thiocyanate and serum total testosterone (TT) in the general population. The present study utilized data from the 2011–2016 National Health and Nutritional Examination Survey (NHANES). A total of 6201 participants aged 6–79 with information on urinary perchlorate, nitrate, thiocyanate, and serum total testosterone were included. We conducted multiple linear regression models and Bayesian Kernel Machine Regression (BKMR) models to estimate the associations by sex-age groups. Children (ages 6–11) have higher levels of perchlorate and nitrate than the rest. After adjusting for covariates, urinary perchlorate was significantly negatively associated with serum TT in male adolescents (β = −0.1, 95 % confidence interval: −0.2, −0.01) and female children [−0.13, (−0.21, −0.05)]. Urinary nitrate was significantly negatively associated with serum TT in female children, while urinary thiocyanate was significantly positively associated with serum TT in female adults aged 20 to 49 [0.05 (0.02, 0.08)]. BKMR analysis indicated that no other interactions were found between urinary perchlorate, nitrate, and thiocyanate. Our findings suggested that urinary perchlorate, nitrate, and thiocyanate levels may relate to serum total testosterone levels in specific sex-age groups. We identified male adolescents and female children as are most sensitive subgroups where testosterone is susceptible to interference.