China’s market selloff can safely be declared a rout.

Nearly a third of the country’s individual investors—more than 20 million people—fled the plunging stock markets last month. The number of retail investors holding stocks in their accounts slid to 51 million at the end of July from 75 million at the end of June, according to China Securities Depository & Clearing Corp., the government agency that tracks accounts. As they ran, the Shanghai Composite Index suffered its biggest monthly decline in six years, falling 14%...