To detail the relationship between parental mental illness and the likelihood of out-of-home care (OHC) among their children, and to identify factors which modify this relationship. Using Swedish national registers, children born in 2000 to 2011 (n = 1 249 463) were linked to their parents. Time-dependent parental mental illness (nonaffective and affective psychosis, substance misuse, depression, anxiety and stress, eating disorders, personality disorders, attention deficit hyperactivity disorder, autism, and intellectual disability), was identified through International Classification of Diseases codes. After adjustment for socioeconomic factors, children living with mentally ill parents were 4 times as likely to be placed in OHC than children without (95% confidence interval [CI] 4.24-4.61). The highest hazard ratio (HR) was in the youngest children aged 0 to 1 year (5.77, 95% CI 5.42-6.14), exposed to maternal illness (HR 4.56, 95% CI 4.37-4.76), and parental intellectual disability (HR 4.73, 95% CI 4.09-5.46). Children with parental mental illness with multiple risk factors were at particularly high risk. Compared with children without parental mental illness, and those with university-educated parents, children whose parents had mental illness and only had education to age 16 had a 15 times higher risk of OHC (95% CI 13.75-16.54). Children with parental mental illness are considerably more likely to be removed from home into care during childhood, particularly during the first year of life and if they are from socially disadvantaged families. Greater knowledge of these risks should lead to increased support for vulnerable new families.