The relatives -- including a three-year-old child -- were killed in the central village of Bakaro on Saturday. Another person suffered superficial burns.
"Twenty-five farmers sheltering from rain under a thatched cottage after leaving their rice field were hit by a lightning bolt," said medical inspector William Patrick Rakotondralambo of the Fitsinjovana commune.
"Six people from the same family were killed on the spot, including a three-year-old child," he added.
Eight survivors were treated for shock, Rakotondralambo said.
Lightning strikes are relatively common in Madagascar, an Indian Ocean island famed for its unique wildlife and well-known for its vanilla and precious redwood.