Almost every day of his childhood, He Xin remembers the skies in his hometown of Shenyang being gray. "If I wore a white shirt to school, by the end of the day it would be brown," recalls He, who was born in 1974, "and there would be a ring of black soot under the collar."

He grew up in Shenyang (population 8 million), the capital of northeastern China's Liaoning province, a city famous for its heavy industry and manufacturing — and soot and pollution. Growing up, the view he remembers most vividly was looking out over Shenyang's fabled Tiexi industrial district, home to several large iron and steel plants and the site of China's first model workers village: "When I was a teenager, if I climbed a tall building to look out over Tiexi, all I would see was a forest of large smokestacks, chimneys, and dark, billowing smoke."

But today all that is gone. No longer standing are Tiexi's iconic smokestacks and its blocks of red brick workers' dormitories, with their rows of coal-fired chimneys atop. Now He is the vice president of the environmental consultancy BioHaven and splits his time between Shenyang, Beijing, and St. Louis. To him, Shenyang looks almost unrecognizable today.

"It's not perfect, but the air is cleaner... almost like it's not in China," he said, adding: "The only thing the same is the statue of Chairman Mao." He was referring to the saluting bronze figure that still dominates downtown People's Park, one of the largest statues of Mao Zedong in China.

If the city long known as the "elder brother" of industry for its central role in Mao's drive to industrialize China in the 1950s and '60s has recently made strides to clean up its act, He isn't the only one to take notice. Last November, the Urban China Initiative (UCI), a think tank co-founded by McKinsey & Co., Columbia University, and Beijing's Tsinghua University, released its first "Urban Sustainability Index" for China. The index assessed sustainability in 112 cities by looking at 18 environmental indicators — from air pollution to waste recycling to mass transit — for the years 2004-2008. Among Chinese cities, Shenyang emerged as a leader in environmental improvement.

According to UCI's research, Shenyang had removed virtually all traces of heavy industry from its core by 2010. In new residential areas, coal heating had been replaced by natural gas. Urban green space had increased 30 percent from 2005 to 2007. Perhaps most significantly, the heavy industry that does operate in the city — now relocated to facilities in the outer suburbs — is significantly less polluting than heavy industry elsewhere in China: Shenyang's plants emit about one-fifth the level of sulfur oxides as the national average in China. The reason, quite simply, is that the city tore down most of its old factories and literally started again, with newer facilities and desulfurization equipment. "The evolution is significant," Jonathan Woetzel, a director in McKinsey's Shanghai office, told me.

Curious to see the changes for myself, I visited Shenyang last month. For four days, the skies were eggshell blue, with intermittent clouds and one rain shower. As anyone who has lived in a Chinese city knows, air pollution levels vary day to day, with weather and the direction of the wind. But even if Shenyang's skies were not always as bright as what I saw, it's clear the city's run of unending gray days is over. Residents told me the skies were much clearer than ten years ago.

The Tiexi district today is worlds away from the forest of smokestacks that He remembers. It now has new four-lane roads, upscale apartment complexes, a Carrefour store, and Shenyang's first Ikea (the sign outside reads: "No dream too big, No home too small"). Many residential streets are lined with gingko trees. Shenyang's other central districts were also in various stages of a makeover.

Of course, I wouldn't yet label Shenyang as "green" on par with, say, Portland, Maine. Construction dust accompanying the city's current building boom adds a new kind of air pollution, and while Shenyang's wastewater treatment rate of 77 percent is better than most Chinese cities (the average rate is 70 percent), it remains well below developed-world standards. Still, it's worth asking: Why did a once-infamous Smogville begin to shed its gray?

To a large extent, it was necessity.

Shenyang, which is the capital of Liaoning province in northeastern China, played a central role in Mao's drive to industrialize China.

"To be honest with you, it is very hard to shut down a factory that still makes a lot of money," an air-quality specialist in Shenyang's environmental protection bureau told me. "But many of Shenyang's factories had 50-year-old equipment, and they were economically dead already." With a nod to the fact that economic and environmental ministries in China often have clashing priorities, she added, "It is hard to make any real progress without the other ministries [in agreement]."

It's common in China for environmental officials to find themselves crusading to shut down lucrative but dirty factories, often in vain. But Shenyang turned out to be the exception that proves the rule about economic growth trumping green priorities in China. The reason many of its storied old factories shut down was because they had to — they simply weren't making money.

The change didn't happen overnight, nor was it painless. In the 1990s, Beijing began to withdraw support from many large state-owned enterprises, forcing them to sink or swim in the market. If Shenyang's factories represented China's state-of-the-art in the 1950s, a half-century later that was no longer true; the equipment was rusted, and the management systems bloated and inefficient. Hundreds of Shenyang's factories were closed, from foundries to farm-equipment manufacturers, and thousands of workers laid off. (By some estimates, the unemployment rate was twice the national average.) In the early 2000s, the demolitions began; wrecking crews worked day and night tearing down, block by block, the shell of the past.

During this time, Shenyang was lucky to have an innovative and charismatic environmental protection bureau chief, Li Chao. His popular initiatives included starting the bureau's environmental blog and establishing a citizen complaint line for air and noise pollution. But more importantly, his goals often aligned with those of the city's far more powerful construction and development ministries, as well as the district-level governments that managed reconstruction.

When it came time for rebuilding, Tiexi district manager Li Songlin knew there was no looking back. His goal was not to recreate an industrial district, but instead to build a foundation to tap into China's red-hot residential real-estate market and attract light manufacturing. To that end, he coordinated with the city's environmental protection bureau and the Shenyang Academy of Environmental Sciences, a local research institute, to develop a program for soil decontamination at the sites of old factories, such as the former Shenyang Smelting Plant, demolished in 2000. For that site, the government paid the $19 million cleanup tab. But the value of land around the plant, now converted to real estate, has risen many multiples that investment, according to the Xinhua news agency. In short, the green makeover made economic sense.

For large infrastructure projects, Shenyang has also benefited from the ability of its savvy and well-connected leaders to make their case in Beijing. Each year, the central government announces a pot of money for new municipal infrastructure projects that cities can bid for. The details of how money is transferred are opaque to outsiders. But Shenyang, ever a stronghold of the political establishment, has fared well. For instance, the city recently received a slice of funding from Beijing for its subway system, now under construction; the first line opened in 2010, and the second line is scheduled to open next year.

Money and unified political will make things happen. "One of our study's key findings was that those cities that have made the most environmental progress," McKinsey's Woetzel explained, "were often those that had the best coordination across departments and levels of government."

While much of China's recent environmental news is bleak, from water shortages to rising energy demands, Shenyang's example provides at least one beacon of hope. It just might be that, as with Pittsburgh and London before it (in the 1950s, London smog was so thick it hid the sun at noon), this Chinese city's dirtiest days may finally be behind it.