Alibaba (BABA 2.27%) notoriously burned investors in 2021.

When American tech stocks were soaring during the COVID-19 pandemic, the Chinese tech giant was heading in the other direction as a crackdown from Beijing made the stock kryptonite to many investors, and a weak Chinese economy only made matters worse.

Now, after chugging along in the sub-$100 range for a roughly three-year period, something surprising has happened to the stock. Alibaba is soaring. The stock is up 44% over the last month, and has more than doubled year to date, up 110% now.

The word "Alibaba" on grass at the company's headquarters.

Image source: Alibaba.

What's fueling Alibaba's gains?

More than anything else, Alibaba's moves into artificial intelligence (AI) and the perceived discount in the stock heading into the year seem to have fueled its rally.

While overall growth is still modest, at least compared to pre-pandemic levels, at 10% organic revenue growth in the June quarter, investors have been willing to look past that in favor of its AI strategy.

Early in the year, Alibaba announced plans to invest at least $52 billion in cloud computing and AI infrastructure for the next three years.

Alibaba is best known for its e-commerce business, which includes Tmall and Taobao, but its cloud business has also been a growth engine for several years, and that seems to be taking center stage in the AI era. Much like in the U.S., Chinese tech companies are rapidly stepping up investments in AI infrastructure in a similar arms race.

Alibaba's recent rally began at the end of August after a strong June quarter earnings report that included 26% growth in its cloud intelligence group, and it said AI-related product revenue grew by triple digits for the eighth consecutive quarter. It also touted other improvements in its quick commerce business and cost savings by combining resources in its consumer platforms. Its launch of on-demand delivery on Taobao, for example, led to a 25% increase in monthly active consumers on the Taobao app.

Finally, the stock jumped on Sept. 24 after CEO Eddie Wu announced several AI initiatives at a company conference. Alibaba said it would increase AI spending beyond its earlier target of $52 billion over the next three years. It also announced a new partnership with Nvidia in physical AI, working together in areas like robotics and self-driving cars. Finally, the company also unveiled its new large language model, Qwen3-Max, its biggest one yet, with more than 1 trillion parameters.

Combined, those initiatives show Alibaba making technological progress in AI, and that's likely to drive continued growth in its cloud business.

Jack Ma's return

Another factor driving Alibaba is the return of founder Jack Ma. Ma sparked the crackdown on Alibaba and the broader tech industry when he made insulting comments about Chinese finance ministers at a conference.

Ma laid low for a long time, avoiding the public eye, but he met with Chinese President Xi Jinping earlier this year, signaling a detente in the standoff.

The event seemed to signal that Beijing was again embracing China's tech sector, which is crucial to China's hope of being a leader in AI technology. While he doesn't seem to have a formal position at the company, Ma is back at Alibaba headquarters, helping to shape strategy around AI, e-commerce, and other key initiatives.

Is Alibaba safe to buy now?

During its recovery, Alibaba has attracted high-profile American investors like billionaire David Tepper and Cathie Wood, recently, and Ma's reception by the Beijing leadership seems to indicate that the earlier crackdown is very much over.

Even after the stock more than doubled this year, Alibaba still trades at a discount to its big tech peers in the U.S. at a price-to-earnings ratio of just 20, which makes further gains in the stock easily achievable.

While Chinese stocks will always have some risks that don't affect their American counterparts, Alibaba has clearly moved out of the penalty box, and is now being judged on the merits of its business, rather than the risks of a rogue government. Investors should feel comfortable buying and holding the stock at this point.