SETLAGOLE, South Africa — Under a midmorning sun that augured punishing heat later in the day, a handful of cows stood still inside a small pen, their ribs protruding. Too weak to reach the nearest grassy field some miles away, some munched on tall grass that their owner had cut from a strip of land along the highway, in a desperate attempt to save his cattle from the drought afflicting the land.

The owner, T. J. Koee — a former miner and a full-time cattle farmer for the past 16 years — listed the drought’s toll this year: 19 dead cows, 38 left, none sold. Last year, he sold 17 calves, earning enough to support his family and send two of his children to college.

“I don’t know what I’m going to do next school year because there’s no profit,” said Mr. Koee, 45, surrounded by a brown and dusty landscape that should have turned green by this time of year. “If this drought continues, all my animals will die.”

The worst drought in more than a generation has gripped South Africa and other African nations as El Niño, a weather phenomenon believed to have been intensified by climate change, brings record high temperatures and low rainfalls across much of the continent. The full impact of the drought and resulting poor harvests will be felt only in the months ahead, but they have already left 29 million people in southern Africa without reliable access to food, according to the United Nations. In East Africa, particularly Ethiopia, 10 million people will need food assistance next year, aid organizations warn.