By Scott Cendrowski

FORTUNE— China’s Internet giants once felt like abstractions to Western businesspeople. Tales of Alibaba, Baidu, and Tencent fighting for dominance, and hundreds of millions of Internet users, seemed like foreign powers fighting on far away battlefields. But that’s all changed over the past couple years. The commerce and social media sites have grown into streamlined gateways for Western products. Alibaba’s TMall, for one, sells L’Oreal makeup and Nike shoes. Tencent’s video site is investing heavily in streaming Hollywood films. Moreover, e-retail rivals Alibaba and JD.com are soon offering public shares in what should be blockbuster IPOs.

Thus, Tencent’s new partnership with JD.com is noteworthy. The companies announced yesterday that Tencent is spending $215 million for a 15% stake in the pre-IPO JD.com. JD.com, meanwhile, absorbs two of Tencent’s e-commerce businesses, while also getting access to sell goods on Tencent’s mega popular WeChat social network, which has 270 million monthly users. The partnership is a way for the two companies to better fight giant Alibaba in China’s $275 billion e-retail market.

The deal makes sense for both sides. Tencent is unloading ecommerce businesses that have stagnated as its focused on social media. JD.com, which runs the second largest e-commerce site, behind Alibaba, can use Tencent’s old business-to-consumer site and consumer-to-consumer site to take a bigger dent out of Alibaba’s popular TMall and Taobao. “Tencent is off-loading capital intensive non-core businesses that haven’t achieved satisfactory results,” writes J.P. Morgan’s Alex Yao. In other words, Tencent is getting out while it still has something to salvage.

MORE: Tencent moves to challenge Alibaba in online shopping

China’s e-commerce sites used to be far more. JD.com was the place you went to buy cheap authentic electronics. Alibaba’s Taobao was the place you bought anything you would imagine, at the risk of those products being fakes (jiade). Now, Taobao’s quality ratings are improved and JD.com has lost some appeal. Many people I know in Beijing shop for products on both sites, and buy from whichever one has the better shipping option.

From Tencent, JD.com gets businesses to expand its reach (selling on WeChat is a huge opportunity). From JD.com, Tencent gets an opportunity to invest in the business before what should be a huge IPO and focus even more of its capital on expanding overseas, which it has already done in Silicon Valley and outside China’s borders.