Background: cognitive impairment has been documented in adult diabetes but is unclear in pediatric diabetes. No study had been conducted to explore the relationship between attention-deficit/hyperactivity disorder (aDhD) and diabetes. Using a population-based data set, we aimed to examine the association between aDhD and a prior diagnosis of diabetes mellitus (DM) in Taiwan. Methods: a total of 4,302 patients with aDhD were selected as cases and 21,510 randomly selected subjects as controls. We used conditional logistic regression to calculate the odds ratio (OR) for having previously received a diagnosis of DM between subjects with and without aDhD. results: In this study, 116 of the 25,812 sampled subjects (0.5%) had received a diagnosis of DM prior to their index date. subjects with aDhD had a higher proportion of prior DM diagnoses than controls (0.9% vs. 0.4%, P < 0.001). after adjusting for age, sex, index year, geographic location, and obesity, aDhD was significantly associated with a prior diagnosis of type 2 DM (OR = 2.75, 95% confidence interval (cI) = 1.82-4.16). however, no significant association was observed between aDhD and type 1 DM. conclusion: The findings suggest that aDhD was associated with a previous diagnosis of type 2 DM.