Answer:
China was a major power in decline. Western powers benefited from this by realizing their commercial interests in the country. Western powers, for example, stipulated mining concessions and free trade access to the ports.
Increasing socio-economic disruption led to great dissatisfaction among uprooted and impoverished farmers, who were under the spell of rebellious, semi-religious organizations. Such a secret political / religious society, the Boxers, operated in Shandong. The Boxers were characterized by their dissatisfaction with Western interference and the Chinese imperial dynasty. They propagated the expulsion of both Western settlers and the imperial dynasty. Since they were protected and secretly encouraged by the governor of Shandong, they were able to grow into a kind of popular militia.
The conservative Manchu court, under the leadership of the Empress Regent Cixi, who was hostile to even minor "Western" innovations, was also not happy with Western influences. She managed to turn the otherwise anti-dynastic xenophobia onto foreigners and win the Boxers for her in October 1899. Thus, Court and insurgents formed a front against the West. Cixi issued measures that protected the Boxers, which led to great unrest among Western diplomats.