Background Atopic dermatitis (AD) is the chronic inflammatory disorder that affects both in childhood and adulthood. Mounting evidence indicates that gut dysbiosis contributes to AD via the gut-skin axis. Constipation can result in alteration of the gut microflora. The clinical impact of constipation on AD has not been researched. Therefore, we aim to assess the risk of AD in constipated patients by the population-based cohort study. Methods We collected 87015 constipated people and 87015 people without constipation between 1999 and 2013 from the Taiwanese National Health Insurance Research Database. Propensity score analysis was administrated to match age, gender, comorbidities, and medications at a ratio of 1:1. Multiple Cox regression analysis was utilized to evaluate the adjusted hazard ratio of AD. In addition, sensitivity tests and a stratified analysis were conducted. Results The incidence of AD was 4.7 per 1,000 person-years in the constipation group, which was higher than the rate of 2.2 per 1,000 person-years observed in the non-constipation group. After adjustment for age, gender, comorbidities, corticosteroids, and antihistamine, constipated people had a 2.11-fold greater risk of AD compared to those without constipation (adjusted hazard ratio [aHR]: 2.11 (95% C.I. 1.98-2.24). Moreover, constipated people had a higher likelihood of AD, regardless of gender, comorbidities, as well as the usage of corticosteroids, and antihistamines. Conclusion Constipation is associated with a significantly risk factor of AD. Clinicians should be careful of the possibility of AD in constipated people. Further study is warranted to investigate the possible pathological mechanisms of this relationship.