Large-scale family studies on the co-occurrence of attention-deficit/hyperactivity disorder (ADHD) and borderline personality disorder (BPD) are lacking. Thus, we aimed to estimate the co-occurrence and familial co-aggregation of clinically ascertained ADHD and BPD diagnoses using the entire Swedish population. In a register-based cohort design we included individuals born in Sweden 1979-2001, and identified their diagnoses during 1997-2013; in total, 2,113,902 individuals were included in the analyses. We obtained clinical diagnoses of ADHD and BPD from inpatient and outpatient care. Individuals with an ADHD diagnosis had an adjusted (for birth year, sex, and birth order) odds ratio (aOR) of 19.4 (95% confidence interval [95% CI] = 18.6-20.4) of also having a BPD diagnosis, compared to individuals not diagnosed with ADHD. Having a sibling with ADHD also increased the risk for BPD (monozygotic twins, aOR = 11.2, 95% CI = 3.0-42.2; full siblings, aOR = 2.8, 95% CI = 2.6-3.1; maternal half-siblings, aOR = 1.4, 95% CI = 1.2-1.7; paternal half-siblings, aOR = 1.5, 95% CI = 1.3-1.7). Cousins also had an increased risk. The strength of the association between ADHD and BPD was similar in females and males, and full siblings showed similar increased risks regardless of sex. Among both males and females, ADHD and BPD co-occur within individuals and co-aggregate in relatives; the pattern suggests shared genetic factors and no robust evidence for etiologic sex differences was found. Clinicians should be aware of increased risks for BPD in individuals with ADHD and their relatives, and vice versa.