The history of the Great Wall of China began when fortifications built by various states during the Spring and Autumn (771 -- 476 BC) and Warring States periods (475 -- 221 BC) were connected by the first emperor of China, Qin Shi Huang, to protect his newly founded Qin dynasty (221 -- 206 BC) against incursions by nomads from Inner Asia. The walls were built of rammed earth, constructed using forced labour, and by 212 BC ran from Gansu to the coast of southern Manchuria.

Based on this passage, great wall of china was built in what dynasty? Let's give stream of consciousness first:
The relevant sentence in the passage is: The history of the Great Wall of China began when fortifications built by various states during the Spring and Autumn (771 -- 476 BC) and Warring States periods (475 -- 221 BC) were connected by the first emperor of China, Qin Shi Huang, to protect his newly founded Qin dynasty (221 -- 206 BC) against incursions by nomads from Inner Asia.
So, the final answer is Qin dynasty.