Pregnant women may take nonsteroidal antiinflammatory drugs (NSAIDs), selective cyclooxygenase (COX)-2 inhibitors, or biological agents to relieve symptoms or manage disease flares in late pregnancy. We aimed to quantify the risk of prematurity associated with late pregnancy exposure to nonselective NSAIDs, selective COX-2 inhibitors, and biological agents. Using data from Quebec Pregnancy Cohort, we performed a population-based cohort study. We included all women who were covered by the Quebec Drug Plan and had a singleton live birth between January 1, 1998 and December 31, 2009. Late pregnancy exposure was defined as having filled at least 1 prescription for nonselective NSAIDs, selective COX-2 inhibitors, or biological agents in the 3 months before delivery. Prematurity was defined as <37 weeks of gestation. Crude and adjusted odds ratios (OR) were obtained using generalized estimation equation models. Covariates included maternal autoimmune diseases, demographics, concomitant drug use, history of pregnancy complications, and other comorbidities. A total of 156,531 pregnancies met inclusion criteria and were considered for analyses. In the 3 months before delivery, 391 pregnancies were exposed to nonselective NSAIDs, 55 to COX-2 inhibitors, and 12 to biological agents. After adjustment for maternal autoimmune diseases, concomitant medication use, and other risk factors, COX-2 inhibitor use in late pregnancy was associated with a 2.46-fold increased risk of prematurity (adjusted OR, 2.46; 95% confidence interval, 1.28-4.72) compared to nonuse; only late pregnancy exposure to celecoxib was found to increase the risk (adjusted OR, 3.41; 95% confidence interval, 1.29-9.02). In conclusion, celecoxib use during late pregnancy may increase the risk of prematurity.