Immunological changes in and after a pregnancy may influence the onset of autoimmune diseases. An increased incidence of hyperthyroidism has been observed both in early pregnancy and postpartum, but it remains to be studied if the incidence of hypothyroidism varies in a similar way. Population-based cohort study using Danish nationwide registers. All women who gave birth to a singleton live-born child in Denmark from 1999 to 2008 (n = 403 958) were identified, and data on hospital diagnosis of hypothyroidism and redeemed prescriptions of thyroid hormone were extracted. The overall incidence rate (IR) of hypothyroidism during 1997-2010 and the IR in three-month intervals before, during and after the woman's first pregnancy in the study period were calculated and compared with the IR of hyperthyroidism. Altogether 5220 women were identified with onset of hypothyroidism from 1997 to 2010 (overall IR 92.3/100 000/year) and 1572 women developed hypothyroidism in the period from 2 years before to 2 years after birth of the first child in the study period. The incidence of hypothyroidism decreased during the pregnancy (incidence rate ratio (IRR) vs overall IR in the rest of the study period: first trimester: 0.89 (95% CI: 0.66-1.19), second trimester: 0.71 (0.52-0.97), third trimester: 0.29 (0.19-0.45)) and increased after birth with the highest level at 4-6 months postpartum (IRR 3.62 (2.85-4.60)). These are the first population-based data on the incidence of hypothyroidism in and around pregnancy. The incidence declined during pregnancy followed by a sharp increase postpartum. Notably, hypothyroidism as opposed to hyperthyroidism showed no early pregnancy increase.