The Opium Wars had a huge impact on the global perception of China. For centuries, the world knew that China was one of the more advanced civilizations. With the clear-cut British defeat of China with relatively few troops, the world realized that China was an easy target. What's more, the Chinese themselves knew that their government was weak, and so they, too, started to rebel against it. Internal rebellion started at the beginning of the nineteenth century with the White Lotus Rebellions led by Buddhists who were frustrated over taxes and government corruption. It continued through the middle of the century with the Taiping Rebellion. The Taipings, led by a religious zealot claiming to be the brother of Jesus, recruited an army nearly a million strong and nearly succeeded in bringing down the Manchu government. The rebels failed, but the message was clear. China was crumbling from within, and unable to stop foreign aggression from outside.
In the 1860s, the Manchu Dynasty tried to get its act together in what became known as the Self Strengthening Movement, but it did no good. In 1876, Korea realized China was weak and declared its independence. Later, in the Sino-French War (1883), the Chinese lost control of Vietnam to the French, who established a colony there called French Indochina. If that wasn't enough, a decade later the Chinese were defeated in the Sino-Japanese War, when the rising imperial power of Japan wanted in on the action. In the Treaty of Shimonoseki (1895), China was forced to hand over control of Taiwan and grant the Japanese trading rights similar to those it had granted the Europeans. Japan also defeated the Koreans and took control of the entire peninsula.
Meanwhile, the European powers were rushing to establish a greater presence in China. By establishing spheres of influence, France, Germany, Russia, and of course Britain carved up huge slices of China for themselves. These spheres were not quite colonies. Instead, they were areas in which the European powers invested heavily, built military bases, and set up business, transportation, and communication operations. The Manchu Dynasty was still the governmental authority within the spheres.
By 1900, the United States, which had its own trading designs on Asia, was worried that China would become another India or Africa, and that the United States would be shut out of trade if the Manchu government fell and the Europeans took over the government. Through its Open Door Policy, the United States pledged its support of the sovereignty of the Chinese government and announced equal trading privileges among all imperial powers (basically Europe and the United States).