This from Wikipedia...

Although a useful deterrent against raids, at several points throughout its history the Great Wall failed to stop enemies, including in 1644 when the Manchu Qing marched through the gates of Shanhai Pass and replaced the most ardent of the wall-building dynasties, the Ming, as rulers of China.