By Chong Koh Ping

Chinese shares fell the most in five months, as signs of an uneven economic recovery rattled investors already worried by a rapid run-up in the country's stock markets.

The benchmark Shanghai Composite retreated 4.5% Thursday. That means it has now fallen for four of the past five sessions, after surging since the end of June on optimism that China has shaken off the worst effects of the coronavirus.

Riskier indexes fell more steeply, with the technology-focused ChiNext in Shenzhen dropping 5.9%. Some stocks on Shanghai's fledgling STAR market tumbled by double-digit percentages.

Data Thursday showed China's economy rebounded to grow a larger-than-expected 3.2% in the second quarter. However, retail sales unexpectedly shrank 1.8% year-over-year in June, while auto sales fell 8.2% by the same measure.

The rebound was "uneven across sectors, with infrastructure, property investment and public services leading the growth recovery, while the private sector has shown continued weakness," HSBC economist Jingyang Chen said in a note. Ms. Chen said consumer spending and private investment were both lagging behind, and needed to recover for employment to stabilize.

The selloff gathered pace through the day. Analysts and investors noted Thursday's falls built on smaller drawdowns in recent days, which followed signals that authorities want to avoid markets overshooting.

Signs that policy makers are taming the markets and mixed economic data are weighing on investor sentiment, said Sylvia Sheng, a global multiasset strategist in Hong Kong with J.P. Morgan Asset Management.

Kweichow Moutai Co., an investor favorite in China and the world's most valuable liquor company, slumped 7.9%. An editorial in a social-media account run by the People's Daily, the Communist Party mouthpiece, said Moutai, the potent Chinese liquor distilled by the company, shouldn't be used for speculation or bribes.

Other food and drink companies, as well as brokerages, were among the day's steepest fallers.

David Chao, global market strategist for Asia Pacific ex-Japan at Invesco, said the retail figures weren't so bad, given they had actually risen month-over-month.

This is irrational selling by individual investors, he said. Still, he said this had been "a correction in the making for a while," after those investors piled into an overheating stock market.

Colin Low, senior macro analyst at FSMOne.com in Singapore, said recent geopolitical tensions had also put pressure on the market, referring to actions including President Trump's signing into law a bill to punish Chinese officials over Beijing's crackdown on Hong Kong.

Xie Yu contributed to this article.

Write to Chong Koh Ping at chong.kohping@wsj.com