China seperated themselves from the rest of the world by refusing to trade because they thought their culture was above everyone elses and didn't need anyone else.
Opium Wars The British started smuggling in opium to the chinese citizens and eventually ended up getting into a battle with the British Navy and losing a lot of warriors.
Taiping Rebellion: Hong Xiuquan woke up from a dream where he claimed to have talked to God and he was told he was Jesus' brother and led a crowd acting as the Son of Christ and and controlled a large group of Christians.
The Open Door Policy: China signed an agreement to let foreigners enter the country as they pleased and trade. All foreigners are above the law and do not need to abide by the laws the Chinese citizens abide by.
The Boxer Rebellion : The Righteous and Harmonious Fists started killing foreigners and Christians as they thought everyone else were taking over the Fists' territory.