You may be confusing the Taiping Rebellion (1850-1864, 20-30M dead) with the Boxer Rebellion (1899, 100,000 dead)?
The Taiping Rebellion was a civil war between the Taiping (ethnic Hakka, Han subgroup) and Qing dynasty (ethnic Manchu). While yes British opium was a destabilizing factor, so was rampant Qing corruption, religious/ethnic zealotry, etc. China had constant wars for millennia, and this war coincided with the invention of modern guns and artillery while still using pre-modern tactics, which (like the American Civil War) made it especially deadly. Its disingenuous to pin an internal and ill-timed conflict on "capitalism".