Last year, President Xi Jinping seemed all but invincible. Now, his push to steer China away from capitalism and the West has thrown the Chinese economy into uncertainty and exposed faint cracks in his hold on power.

Chinese policy makers became alarmed at the end of last year by how sharply growth had slowed after Mr. Xi tightened controls on private businesses, from tech giants to property developers. Meanwhile, China’s stringent Covid lockdowns, part of Mr. Xi’s approach to handling the crisis, have ramped up again as Covid cases surge, hurting both consumer spending and factory output.

Add to that a pact with Russia in early February, just weeks ahead of its invasion of Ukraine, that has widened a gulf between China and the West and underlined how high the costs could be for China of implementing Mr. Xi’s agenda at home and in foreign policy.

As Beijing works to manage the entente with Russian President Vladimir Putin while preventing a collapse in its relationship with the West, underpinning the disquiet is the plunge in economic growth to 4% in the fourth quarter from 18.3% at the beginning of 2021. Officials are now speaking of a “course correction” to mitigate some of the effects of Mr. Xi’s policies.

The maneuverings come as Mr. Xi sets the stage to extend his rule, which began in late 2012, for a third term. Party insiders said there is little doubt that he will prevail at a Communist Party conclave later this year—for one thing, there is no potential successor candidate.

But other voices in the party have recently suggested a measure of skepticism over whether now is the right time to pursue Mr. Xi’s vision of remaking China in the spirit of Mao Zedong.

Some senior officials have indicated they are worried about the costs of the alignment with Russia. Chinese manufacturers are now racing to assess the risks of becoming collateral damage in Western sanctions on Moscow. Soaring commodity prices are squeezing Chinese businesses already facing weakening global demand. The U.S. has indicated it won’t hesitate to inflict pain on China if its companies and banks help Russia.

“The Ukraine crisis has made Xi’s domestic economic challenge harder at a time when he craves stability,” said Diana Choyleva, chief economist at Enodo Economics, a London-based risk forecaster.

Both the pact with Russia and the economic downturn at home grew out of Mr. Xi’s drive to stand up to the U.S. and mark some distance from Deng Xiaoping’s policy of opening China to the Western world. Paired with an increasingly hard stance toward China in Washington, relations with the U.S. and its allies have sunk to their lowest level in decades.

Whenever Mr. Xi has had an opportunity to challenge the U.S.-led world order, he has taken it, prioritizing political goals over economic ones.

Last year, a ban on Australian coal, after Canberra angered Mr. Xi by edging closer to the U.S., worsened a power shortage that forced manufacturers to temporarily close factories.

Shortly before Russia invaded Ukraine, Beijing agreed to purchase oil and gas from Russia valued at an estimated $117.5 billion. China may be able to renegotiate terms or get discounts as it becomes harder for Russia to sell its gas and oil, but some Chinese officials have questioned whether it made sense to get locked into such contracts when energy prices are high.

Even before the Ukraine crisis, China was already dipping into strategic reserves to combat inflation from soaring commodity prices.

During China’s annual legislative sessions in early March, Mr. Xi sought to inject confidence in his policies. “The game between major powers is becoming more and more fierce,” he told a group of delegates on March 6. “China’s development still has many strategic advantages.”

The same day, Premier Li Keqiang spoke in more somber tones about the risks China is facing. “This year, the external environment has become more complex and severe,” Mr. Li said on the sidelines of the sessions, referring to pressure on China from the outside world. “Domestic development difficulties and challenges have increased.”

Around that time, Hu Wei, a senior adviser to the State Council, stirred up online discussion with an article about Mr. Xi’s pro-Russia policy. “China can’t be tied to Putin and the ties need to be cut off as soon as possible,” Mr. Hu wrote in the piece, which has been taken down by Beijing’s censors. “Cutting off from Putin,” he added, “will help build China’s international image and ease its relations with the U.S. and the West.”

In a country where leaders often try to present a united front, such different messages betray tensions within the top echelon of the party around Mr. Xi’s policies, party insiders say.

Mr. Xi last year rallied the whole government behind his campaign to clamp down on capitalist forces, from tightening Beijing’s grip over data accumulated by the private sector to restricting overseas share listings and shutting off lending to property firms, in a realignment with socialist principles.

By the end of the year, developers’ sales were plunging more sharply than during the global financial crisis. Big tech firms, long a draw for the young and bright in China with their Silicon Valley vibes, were laying off droves of staffers.

China’s top government body, the State Council, was startled by the economic assessment, according to people with knowledge of the council’s economic surveys of major cities.

The leadership had anticipated hits on certain sectors, said an economic adviser in Beijing, but “the speed of the slowdown was a surprise.”

A year-end high-level political meeting all but acknowledged that Mr. Xi’s economic campaign had gone too far.

In recent months, China has scrambled to dial back some of last year’s efforts, policy announcements and interviews with people close to decision-making show.

Financial regulators are loosening restrictions on banks to lend to developers and home buyers. Various government agencies are affirming support for tech firms. Local officials are shifting attention away from wealth redistribution to how to prop up businesses.

The course correction, as some officials describe the recent policy shift, has created openings for other party figures to play a more visible role in what has long been a solo act.

One of them is Mr. Li, the premier. Long sidelined by Mr. Xi, Mr. Li could leverage the economic pressure on Mr. Xi to install more members of his faction in key posts, party insiders said. They said that even though Mr. Li’s term as premier will soon end, he is likely to stay on in a different leadership position.

Some party “elders,” or retired leaders who still have a say in political discourse, have recently spoken up against Mr. Xi’s desire to break with the established leadership-succession system, according to the insiders. They include former Premier Zhu Rongji, an elder statesman known as Boss Zhu in China and an economic reformer admired by the West. Mr. Zhu, who negotiated China’s 2001 entry into the World Trade Organization, privately has questioned Mr. Xi’s state-centered policy, the insiders said.

That Mr. Xi’s hold on power would be in any way questioned was unthinkable just a few months ago, although it is too early to tell how serious the challenge might be. China has a history of mobilizing to quickly overcome economic challenges. And previous powerful leaders Deng and Mao weathered setbacks only to re-establish firm control.

The Information Office of the State Council, which handles media inquiries for senior leaders, didn’t respond to questions.

Since the beginning of the year, various levels of government have shifted away from a near-blanket crackdown on private businesses.

The National Development and Reform Commission, China’s top economic-planning agency, led a group of government agencies in reaffirming support for companies forming the so-called platform economy, such as Alibaba Group Holding Ltd. , the e-commerce giant co-founded by billionaire Jack Ma ; conglomerate Tencent Holdings Ltd. ; and search-engine firm Baidu Inc., which all received stiff regulatory punishments last year for what authorities called anticompetitive behavior.

The effort, people close to the commission said, reflects a tacit admission among the leadership that looser controls are needed to let these companies continue to operate, especially in areas of digital innovation, while at the same time continuing to limit tech giants’ foray into financial areas, such as lending.

A buzzword Mr. Xi introduced last year, “common prosperity,” an aim to distribute wealth more equitably that had made business owners worried about being forced to hand over their fortunes, is barely mentioned anymore.