ObjectivesRacial and ethnic differences in drug testing have been described among adults and newborns. Less is known regarding testing patterns among children and adolescents. We sought to describe the association between race and ethnicity and drug testing at US children's hospitals. We hypothesized that non‐Hispanic White children undergo drug testing less often than children from other groups.MethodsWe conducted a retrospective cohort study of emergency department (ED)‐only encounters and hospitalizations for children diagnosed with a condition for which drug testing may be indicated (abuse or neglect, burns, malnutrition, head injury, vomiting, altered mental status or syncope, psychiatric, self‐harm, and seizure) at 41 children's hospitals participating in the Pediatric Health Information System during 2018 and 2021. We compared drug testing rates among (non‐Hispanic) Asian, (non‐Hispanic) Black, Hispanic, and (non‐Hispanic) White children overall, by condition and patient cohort (ED‐only vs. hospitalized) and across hospitals.ResultsAmong 920,755 encounters, 13.6% underwent drug testing. Black children were tested at significantly higher rates overall (adjusted odds ratio [aOR]: 1.18; 1.05–1.33) than White children. Black–White testing differences were observed in the hospitalized cohort (aOR: 1.42; 1.18–1.69) but not among ED‐only encounters (aOR: 1.07; 0.92–1.26). Asian, Hispanic, and White children underwent testing at similar rates. Testing varied by diagnosis and across hospitals.ConclusionsHospitalized Black children were more likely than White children to undergo drug testing at US children's hospitals, though this varied by diagnosis and hospital. Our results support efforts to better understand and address healthcare disparities, including the contributions of implicit bias and structural racism.