Forty-eight Holstein cows were used in a randomized block design to evaluate different dry period lengths and prepartum milking frequencies (MF) on subsequent milk production, milk composition, solids-corrected milk production, dry matter intake (DMI), and energy balance. Lactating cows, milked 2 times/d, began a 7-d covariate period 35 d prior to the expected calving date. Cows were milked 0 times/d (0x), 1 time/d (1x), and 4 times/d (4x) for the last 28 d of gestation. If milk production decreased to less than 0.5 kg/milking or 1 kg/d, milking via machine ceased; however, teat stimulation continued 1 or 4 times/d according to the treatment assignment. All cows were milked 2 times/d postpartum (wk 1 to 10). Prepartum DMI tended to be greater for 1x and 4x compared with 0x. Prepartum, cows milked 1x produced 17% less milk than cows milked 4x (5.9 and 7.1 kg/d, respectively). There were no differences in prepartum and postpartum body condition scores, body weights, and DMI. Postpartum milk production by cows following their third or greater gestation was greater for 0x and 4x compared with 1x. Postpartum milk production by cows following their second gestation was significantly decreased with increased MF (0x vs. 1x and 4x). Regardless of parity, postpartum solids-corrected milk was greater for 0x compared with 1x and 4x. Postpartum fat yield was greater for 0x vs. 4x, with 1x being intermediate. Postpartum protein yield was greater for 0x vs. 4x, whereas 0x tended to have greater protein yield than 1x. Postpartum energy balance was greater for 1x and 4x relative to 0x. Continuous milking (1x and 4x) resulted in a loss of milk production in the subsequent lactation for cows following their second gestation; however, for cows following their third or greater gestation, increasing the MF from 1x to 4x in the last 28 d of gestation alleviated the loss in milk production.