Xiao Ercha lives in a tumbledown shanty beside a pigsty, thousands of miles and a world away from the awe-inspiring skyscrapers of Beijing and Shanghai.

Tatty mosquito nets hang from the bamboo poles propping up the shack’s cracked asbestos roof; kittens and chickens scuttle across its earthen floor. Xiao, 57, shakes his head when asked to name the leader of his nation, the second largest economy on earth.

“Xi Jinping who?” says Xiao. “I recognise his face from the television – but I don’t know his name.” That is about to change. Xiao, who was born and raised in this mountaintop hamlet near China’s southwestern borders with Myanmar and Laos, is one of millions of impoverished Chinese citizens being relocated as part of the government’s ambitious and politically-charged push to eradicate extreme poverty in the world’s most populous nation.

Within the next three years Xi’s anti-poverty crusade – which the Communist party leader has declared one of the key themes of his second five-year term – will see millions of marginalised rural dwellers resettled in new, government-subsidised homes.

Some are being moved to distant urban housing estates, others just to slightly less remote or unforgiving rural locations. Other tactics – including loans, promoting tourism and pairing impoverished families with local officials whose careers are tied to their plight – are also being used.

By 2020, Beijing hopes to have helped 30 million people rise above its official poverty line of about 70p a day while simultaneously reinforcing the already considerable authority of Xi, now recognised by the Communist party as China’s most powerful ruler since Mao Zedong.

China’s breathtaking economic ascent has helped hundreds of millions lift themselves from poverty since the 1980s but by the end of 2015 at least 5.7% of its rural population still lived in poverty, according to a recent UN report, with that number rising to as much as 10% in some western regions and 12% among some ethnic minorities.

A recent propaganda profile of Xi by the official Xinhua news agency claimed hitting the 2020 target would represent “a step against poverty unprecedented in human history”. In his annual New Year address to the nation on 31 December, Xi made a “solemn commitment” to win his war on want. “Once made, a promise is as weighty as a thousand ounces of gold,” he said.

‘Padangshang’s 143 residents – tea, nut and coffee farmers from the Hani ethnic minority – began moving to their new, bright-pink homes in early November.’ Photograph: Tom Phillips/The Observer

The current wave of anti-poverty relocations – 9.81 million people to have been moved between 2016 and 2020 – is taking place across virtually the whole country, in 22 provinces. However, China’s western fringes, which still lag behind the prosperous east coast, are a focus.

Last year Guizhou, one of China’s most deprived provinces, was aiming to move about 750,000 people from around 3,600 rural locations. More than 1 million people were set to be moved in Gansu, Sichuan and Guangxi, while Yunnan province hoped to move about 677,000 people to nearly 2,800 new villages.

One such community is Padangshang, an isolated hilltop hamlet in Yunnan’s Xishuangbanna prefecture. Provincial officials describe Xishuangbanna, a tropical land of rolling, mist-shrouded hills and jaw-dropping amber sunsets, as one of four key anti-poverty battlefields.

Padangshang’s 143 residents – tea, nut and coffee farmers from the Hani ethnic minority – began moving to their new, bright-pink homes in early November after abandoning a nearby hilltop where access to water was difficult. “We used to have to carry water up from the bottom of the hill … Now we’ve got running water at home,” enthused the community’s Communist party chief, Liu Hengde, interviewed in the lounge of his new home, which he had furnished with an L-shaped sofa and flat-screen TV.

“The government is helping the ordinary folk to lead a good life,” Liu, 30, added, before fastening a machete to the back of his navy blue uniform and offering a tour of the newly-built village to which 13 families had already moved. “Xi Jinping always says that if we give the ordinary folk a better life, the whole country will be well off.”

How can you make sure a billion people trust you and say: ‘This is our strong leader’? Professor Mark Wang

Relocated villagers gave Xi’s war on poverty – and their new two-storey homes – their backing. “When I was a boy I lived in a thick forest. There were insects and leeches, everywhere. Transport was bad. The water supply was bad. The power supply was bad,” said Li Ade, a 30-year-old farmer. “These days the Burmese [over the border in Myanmar] are living in the Mao era while the lives of Chinese people have improved.”

Mark Wang, a University of Melbourne professor who studies Beijing’s use of resettlements to fight poverty, attributes Xi’s focus on the issue partly to the seven years he spent in the countryside during Mao’s Cultural Revolution.

Xi was born into China’s “red aristocracy” – the son of the revolutionary elder Xi Zhongxun – but was exiled to the parched village of Liangjiahe in the 1960s after his father strayed to the wrong side of Mao.

Wang claims those years of rural hardship continued to shape Xi’s political priorities: “From the bottom of his heart he knows the Chinese farmers … He understands what they want ... He even knows the dirty language the people use in the fields when they are farming.”

But hard-nosed political calculations also explained Xi’s attempt to paint himself as a champion of the poor – an effort undermined by a recent crackdown on migrants in Beijing which has reportedly seen tens of thousands of poor workers forced from the capital.

“How can you make sure a billion people trust you, and say: ‘This is our strong leader’?” says Wang. “This is something that will really make people say: ‘Oh, this is something new! At last somebody finally wants to fix this problem’.”

The political function of resettlement is unmissable in Padangshang, where posters of Xi visiting another of Yunnan’s ethnic minorities are plastered on virtually every new home. “The government gave it to me. Every family got one,” said Xiao Ziluo,a 50-year-old builder, as he showed off his new home, which bore the slogan: “Build a Chinese dream with one heart.”

Experts question Beijing’s definition of poverty – the World Bank defines it as someone who lives on less than $1.90 (£1.40) a day – and whether permanently vanquishing poverty is a realistic goal in such a short period. Others believe more emphasis should be placed on fighting urban deprivation.

Wang said he doubted Beijing would manage to completely defeat poverty in so short a time. But given Xi’s daunting political stature, his decision to make the campaign a top political priority – and to make Communist party cadres individually responsible for the plight of poor families in their areas – would have bureaucrats across the country scrambling to succeed. “Every day local officials are thinking: ‘2020 is coming! Oh my God!’” says Wang.

The resettlements are the latest chapter in a decades-old Chinese tradition of moving people. Countless millions have been asked – or ordered – to make way for major nation-building infrastructure projects such as the Three Gorges Dam, which displaced about 1.5 million, and the South-North water diversion, which dislodged at least 345,000.

Development-related relocations have proved highly controversial, with villagers often forced out with little, if any, help or compensation.

Wang said poverty-related relocations, while not uncomplicated, were generally “the most friendly”, as those moved away were mostly allowed to hang on to their old homes and farmlands for a period of time. “[With] all other resettlements they [the government] need something from you: ‘I need your land. I need you to move so I can build a reservoir. I need to convert your land into an industrial or urban [zone].’ For poverty alleviation resettlement, the government doesn’t want anything.”

That may be overly generous. Xiao Ercha, however, is thrilled with his new concrete-floored home, even if, lacking the funds to furnish it, he has yet to move in. “It’s good, good, good!” beamed the farmer, who estimated his annual income at about 1,935 yuan (£220), as he guided the Observer up to the second-floor balcony of his recently completed abode, which boasts spectacular views over the surrounding countryside. “I’ve never seen a house like this before.”

Additional reporting by Wang Zhen