When Chinese President Xi Jinping assumed full control of his country earlier this year, many thought his biggest challenge would simply be keeping the world’s second-largest economy humming. Instead it’s now become clear that his No. 1 problem is staring him straight in the face, which is to say the horrible air pollution not just in Beijing but all over China.

Who cares about high-speed trains, mammoth real estate projects, and giant leaps in standards of living if, after 40 years of explosive growth, the Chinese government can’t provide the most basic element of human existence: clean air. Like any real crisis, this one is unexpected, and to my mind it has become Xi’s first real test as a global leader. The stakes couldn’t be higher, because if he doesn’t turn this problem around in short order, it will undermine the Chinese economy and could quickly spark the ultimate Chinese government nightmare, civil unrest. Obviously the implications here are global.

And remember, this isn’t some sort of invisible, tree-hugging, climate-change issue. We’re talking about can’t-see-across-the-street, not-fit-for-human-life kind of stuff. Ming Sung, Chief Representative, Asia-Pacific, for the Clean Air Task Force, a health and environment advocacy group, notes that cities should keep PM2.5 levels (a measurement of particulate matter with a diameter of 2.5 micrometers) below 25, but “in China you see some of the numbers get all the way to 300,” Ming says. In the northern city of Harbin, PM2.5 levels climbed to more than 1,000 recently. The cause of the Harbin toxicity was attributed to the beginning of the “heating season.” Oh.

One feels for the hundreds of millions of Chinese coping with these conditions, but like many Westerners, I worry about my colleagues there too. We recently deployed writer Scott Cendrowski to Beijing, and he reports back, not surprisingly, that what’s in the air there is the air. “The days are back and forth,” Scott says. “Gorgeous blue skies one day, smog so thick it blankets buildings and you don’t want the cab driver to crack the window the next. I wake up each morning, and before social media I check the China Air Quality Index app.” Sounds difficult, though I’m happy to report that Scott was able to dodge the dust particles long enough to write a groundbreaking piece on China’s race to build a commercial jetliner to rival Boeing and Airbus. (See “China Gets Ready for Takeoff.”)

So what is the Chinese government doing to fix the problem? Well, Reuters reported on the implementation of a color-coded alert system in Beijing “to include a temporary halt of construction, factory production, outdoor barbecues, and the setting-off of fireworks.” Somehow I think addressing the explosive growth in autos and auto emissions, never mind the nation’s hundreds upon hundreds of coal-burning power plants, is more to the point. China has committed to reducing pollution levels in Beijing, Shanghai, and Guangzhou by 2017. But I have noticed that state-controlled media have seen fit to bash Western companies such as Apple and, most recently, Starbucks. It could be that the Chinese government, taking a page from former Presidents Hugo Chávez of Venezuela and Mahmoud Ahmadinejad of Iran, has tried to distract its populace from pressing problems by pointing the finger at outsiders. But with something as in your face as China’s air pollution, this won’t work for long.

This story is from the November 18, 2013 issue of Fortune.