Autism spectrum disorder (ASD) and attention-deficit/hyperactivity disorder (ADHD) are commonly comorbid with allergic and autoimmune diseases in children. The aim of the current study was to investigate the association between children's and first-degree relatives' (i.e., mother, father, and full sibling) allergic and autoimmune diseases and children's ASD and ADHD. We enrolled participants from Taiwan's Maternal and Child Health Database. We used the Cox regression model to examine the associations of familial, siblings' and children's allergic and autoimmune diseases with children's ASD and/or ADHD. In total, we included 1,386,260 children in the current study. We found the significant association between familial allergic or autoimmune disease and development of ASD or ADHD among children. We also identified the predominant impact of familial aggregation on the above associations. The associations between some parental diagnoses of autoimmune or allergic diseases in children's ASD and/or ADHD were stronger in mothers than those in fathers. Early assessment of the possibility of ASD and ADHD is required for children who have a parent with an allergic or autoimmune disease.