Nonsteroidal antiinflammatory drugs are among the medications most widely used by pregnant women, and previous studies have reported an increased risk of miscarriage that is associated with nonsteroidal antiinflammatory drug use during pregnancy. Although the findings have not always been consistent, there is a well-established mechanism for the association: nonsteroidal antiinflammatory drugs inhibit the production of prostaglandin, which is essential for successful embryonic implantation. Abnormal implantation increases the risk of miscarriage. The purpose of this study was to examine the impact of nonsteroidal antiinflammatory drug use in early pregnancy on the risk of miscarriage, especially regarding the timing and duration of use. We conducted a cohort study among pregnant members of Kaiser Permanente Northern California, an integrated healthcare delivery system. Pregnant Kaiser Permanente Northern California members (N=1097) were recruited very early in pregnancy (median gestational age at enrollment, 39 days) to achieve optimal ascertainment of miscarriage, including early miscarriages, which are often missed in studies of miscarriages. Based on the use of nonsteroidal antiinflammatory drugs and acetaminophen, which has similar indication as nonsteroidal antiinflammatory drugs, 3 cohorts were formed: (1) women who used nonsteroidal antiinflammatory drugs only, (2) women who used acetaminophen only (to control for indication), and (3) women who used neither nonsteroidal antiinflammatory drugs nor acetaminophen (unexposed control subjects). Among all eligible women contacted, 63% participated in the study. Miscarriages were ascertained from both electronic medical record data and directly from interviews with participants. The Cox proportional hazards model with accommodation for left truncation was used to examine the risk of miscarriage associated with the use of nonsteroidal antiinflammatory drugs and acetaminophen during pregnancy; we controlled for potential confounders. After an adjustment for multiple confounders that included maternal age, previous miscarriage, multivitamin use, caffeine drinking, and smoking during pregnancy, we found that nonsteroidal antiinflammatory drug use during pregnancy was associated with a statistically significant increased risk of miscarriage compared with both unexposed control subjects (adjusted hazard ratio, 1.59; 95% confidence interval, 1.13-2.24) and acetaminophen users (indication control subjects; adjusted hazard ratio, 1.45; 95% confidence interval, 1.01-2.08). The risk was largely due to nonsteroidal antiinflammatory drug use around conception (adjusted hazard ratio, 1.89; 95% confidence interval, 1.31-2.71) with a statistically significant dose-response relationship: adjusted hazard ratio, 1.37 (95% confidence interval, 0.70-2.71) for nonsteroidal antiinflammatory drug use of ≤14 days; adjusted hazard ratio, 1.85 (95% confidence interval, 1.24-2.78) for nonsteroidal antiinflammatory drug use of ≥15 days. The association was stronger for early miscarriage (<8 weeks gestational age): adjusted hazard ratio, 4.08 (95% confidence interval, 2.25-7.41). Women with lower body mass index (<25 kg/m2) appeared to be more susceptible to the effect of nonsteroidal antiinflammatory drug use around conception (adjusted hazard ratio, 3.78; 95% confidence interval, 2.04-6.99) than women with high body mass index (≥25 kg/m2; adjusted hazard ratio, 1.03; 95% confidence interval, 0.61-1.72). After we controlled for confounding by indication, nonsteroidal antiinflammatory drug use around conception was associated with an increased risk of miscarriage with a dose-response relationship. In addition, women with lower body mass index could be especially vulnerable to the effects of nonsteroidal antiinflammatory drug use around the time of embryonic implantation, although this new observation must be confirmed in future studies.