The association of body mass index (BMI) and gestational weight gain (GWG) with preterm birth (PTB) remains controversial in the literature. To evaluate different maternal BMI and GWG categories, according to the initial BMI, in relation to different PTB subtypes and perinatal outcomes, we conducted a secondary analysis of a multicentre cross-sectional study, along with a nested case-control study including PTB from 20 centers in Brazil. Pre-pregnancy underweight was associated with a lower risk of provider-initiated PTB, while overweight and obesity were associated with a higher risk of provider-initiated PTB and a lower risk of spontaneous preterm birth. Insufficient gestational weight gain was associated with a higher prevalence of spontaneous PTB and preterm premature rupture of membranes. Excessive GWG correlated with a higher prevalence of provider-initiated PTB or preterm premature rupture of membranes. Irrespective of the initial BMI, the greater the rate of GWG, the higher the predicted probability of all PTB subtypes, except for spontaneous PTB in underweight women and those with normal BMI. On multivariate analysis, the initial BMI was shown to be the only factor associated with pi-PTB. Briefly, further studies evaluating the risk for PTB should consider that GWG may have a different role depending on the initial BMI and PTB subtype.