End of the Song Dynasty
The Song Dynasty ended in 1126 when horsemen from the north called the Jurchen (ancestors to the Manchu) imprisoned the Emperor and captured the Song capital of Bianjing. The Jurchean were the conquered by another group of horsemen, the Mongols.
The Great Wall was supposed to keep horsemen like the Jurchen the Mongols out of China. It was breached partly because the horsemen simply went around it and the Chinese government wasted its military budget on an inefficient and unskilled Chinese fighting force rather than hiring horsemen mercenaries who fought using the same tactics as the Mongols.