Coccidiosis is a protozoan disease that causes diarrhea in cattle. This study examines the impact of treating pregnant cows at dry-off with melatonin on postpartum coccidia excretion in dams and their calves. The study population comprised 106 primiparous lactating dairy cows: 53 controls and 53 receiving melatonin on days 220–226 of gestation, plus 99 calves: 52 born from control and 47 from treated dams. Feces samples were collected from each dam on gestation days 220–226 and on days 10–16 and 30–36 postpartum; and from each calf on days 10–16 and 30–36 of age. Postpartum rates of high excretion of oocysts per gram (OPG) (feces counts > 5000) were significantly lower (p < 0.01) in treated than control dams. Low excretion rates of OPG (<2000) were significantly higher (p < 0.01) in the melatonin treatment than control groups in dams on days 30–36 of lactation and in calves at 10–16 and 30–36 days of life. In conclusion, melatonin treatment in lactating cows at dry-off reduced coccidia shedding in dams and their calves during the early postpartum period.