BEIJING — Migrant workers are the unsung heroes of China’s economic miracle. Numbering more than 270 million, they abandon their impoverished farms and villages to move to the cities, where they run the factories and build the highways and high-rises that have made China’s growth the envy of the world.

Now, as China’s economy slows, the country’s leaders have a new mission for them: Buy homes.

China is looking for ways to get migrant workers to help buy up a huge glut of unsold homes that is dragging down the country’s economic growth. Chinese leaders have eased taxes and down payment requirements. They are taking new steps to offer mortgages. And they have eased the tough laws that traditionally have kept migrant workers from putting down roots in big cities.

The leaders want to turn people like Hong Qiwen into home buyers. Mr. Hong, 32, runs a small pastry shop in Xi’an, a city in Shaanxi Province in the country’s north. The province has said it will offer mortgages and other help as part of a $9.1 billion lending push to get people — especially migrants — to buy homes.

But Mr. Hong, a father of two young children who is from a rural area in China’s east, represents the challenge to China’s effort. He has no plans to buy one in Xi’an. “I am like a fallen leaf that will eventually return to the roots,” he said, invoking a Chinese proverb.