Small sections of the Great Wall of China existed prior to 221 B.C., but we have no known record of who built them or how they came to be.
However, we can be certain who is responsible for connecting those small pieces and forming the one long barrier. His name was Emperor Shihuangdi, first emperor of the Qin dynasty.
In an effort to block out invading nomadic tribes, he ordered that the wall be built. Construction started in 221 B.C. and concluded in 204 B.C.
Each subsequent dynasty continued the tradition of guarding the wall and keeping it repaired. Bits and pieces were added, slowly extending the length over time, but the basic structure remained the same throughout the centuries until the Ming dynasty from 1368 to 1644 A.D.
Redesign and re-fortification was undertaken during this time, and the wall extended for thousands of more miles into what we see today.
As a result, there now exists a wall that runs 4,500 miles and extends from the Korean mountains to the Gobi Desert.