Rice has long been a cultural symbol of the Chinese diet. First cultivated by Asian farmers some 8,000 years ago, it has become a major staple crop for the world and has been by far the biggest crop in the country.

But for the last few years, corn has taken the crown for top crop in China. And that’s not because the Chinese have suddenly developed an enormous appetite for corn on the cob—instead, they’re using corn to grow livestock.

Corn production has jumped nearly 125 percent over the past 25 years, while rice has increased only 7 percent, according to the World Bank. A taste for meat is behind the change, since the majority of corn is used to feed pigs, chickens, and cows.

That’s because as the human population moves to urban areas, its living standards increase. The Chinese middle class now has extra money to spend.

View Images Source: FAOSTAT

“As China urbanizes, the distinction between urban and rural lifestyles is blurring, since people travel back and forth between cities and their home villages,” says Fred Gale, a senior economist at the U.S. Department of Agriculture who specializes in Chinese agricultural production.

Indeed, China now accounts for half of the world’s production and consumption of pork. Around 700 million pigs that subsist on diets of corn and other grains are butchered each year in the country—one for every two Chinese people. That’s pretty shocking when you consider that, before the 20th century, the Chinese population got over 90 percent of its calories from carbohydrates like rice, wheat, millet, and beans.

These increasingly meat-centric dietary changes are not unique to China. Animal proteins are becoming more popular across the developing world. But as the most populous country in the world with the fastest growing economy, China sets the pace, says Gale. And the road is currently paved with corn.

Corn isn’t exactly new to China, but a lot has changed since it was first introduced from the Americas in the 1500s. Cornmeal became a staple in the northeastern part of the country, where it was grown, but today people in the region view it as peasant food.

In 1940, around two-thirds of China’s corn was used for food, while today, 60 percent goes to animal feed. Only 10 percent is currently consumed by people or used for seed—you can find novelties like corn-flavored candies and corncob-shaped ice cream treats at markets. KFC serves corn on the cob in China too.

Another 30 percent of the crop is used in industrial processing to create goods like alcohol, sweeteners, and chemicals.

Producing more corn does come with downsides. It requires more intensive applications of chemical fertilizer than other crops. And in northeastern China, many farmers have switched from growing soybeans to corn. This brings in higher profits but puts more fertilizer on the ground. According to the World Bank, China accounts for about 30 percent of total global fertilizer consumption.

Also, China’s corn farmers rarely rotate crops on their fields, which degrades soil fertility, since nitrogen never has the chance to replenish. “It’s probably the largest monocrop in the world,” says the USDA’s Gale. (In the U.S., farmers rotate corn and soybean, so the beans can help fix nitrogen in the soil.)

But growing corn can help address environmental concerns. Government incentives that encourage farmers near Beijing to grow corn instead of rice help improve water quality in the region. Despite corn production’s dependency on fertilizer, corn still uses less water than rice and creates less fertilizer runoff. This switch has decreased pollution in Beijing’s major reservoir, making water safer for residents.

The Chinese government is making other environmental improvements that have led to less chemical fertilizer use. Its Ministry of Agriculture started a soil-testing program that gives site-specific fertilizer recommendations to farmers. Between 2005-2011, fertilizer use dropped by 7.7 million tons, preventing the emission of 51.8 million tons of carbon dioxide.

The World Bank’s Juergen Voegele is optimistic. China’s approach to improving its environment while feeding its citizens “offers useful lessons for agriculture and food policymakers globally,” he says.

A version of this piece appears in the May issue of National Geographic magazine.