McDonald’s Corp. plans to stop using eggs from chickens raised in cages in the U.S. and Canada over the next decade, an image-boosting effort that is likely to have a major impact on North America’s egg industry.

McDonald’s purchases about two billion eggs in the U.S. annually for its Egg McMuffins and other products, and its Canadian business purchases roughly 120 million eggs. That makes the restaurant giant a major buyer in an egg industry that has come under growing criticism in recent years for its decadeslong use of...