Thyroid dysfunction is a frequently found endocrine disorder among reproductively aged women. Subclinical hypothyroidism is the most common condition of thyroid disorders during pregnancy and is defined as manifesting a thyroid-stimulating hormone concentration exceeding the trimester-specific reference value, with a normal free thyroxine concentration. Here, we evaluated the prospective association between spontaneous miscarriage and first-trimester thyroid function. We conducted a case–control study (421 cases and 1684 controls) that was nested. Thyroid-stimulating hormone (TSH), free thyroxine (FT4), thyroid-peroxidase antibody (TPOAb) and thyroglobulin antibody (TgAb) status were measured. We found that higher TSH was related to spontaneous miscarriage (OR 1.21; 95% CI, 1.13–1.30, P < 0.001). Compared with women with TSH levels of 0.4–<2.5 mIU/L, the risk of miscarriage was increased in women with TSH levels of 2.5–<4.87 mIU/L (OR 1.47; 95% CI, 1.16–1.87) and TSH greater than 4.87 mIU/L (OR 1.97; 95% CI, 1.22–3.18). After controlling for the confounding factor, TPOAb positivity status and FT4, the results were similar. The present study showed that higher TSH was associated with miscarriage in early pregnancy. In fact, TSH levels between 2.5 and 4.87 mIU/L increased the risk for miscarriage, with TSH greater than 4.87 mIU/L increasing the risk even further.