Assassination
There have been three assassination attempts on Qin Shi Huangdi. Luckily for him, all of them failed. Based on a movie , one of the assassinations included the assassin distracting the king by showing A map. Another one was planned by the prime minister of the state of Han, Zhang liang, to avenge the emperor's destruction of the state of Han. The last one was was a musician trying to attack him with a lead-filled flute! Because of this, the emperor would move from different places every night so that the assassins wouldn't now where his exact location is.
Another assassination was from another state, the Yen state which lead him into inches from death. (See more in the Who was Qin Shi Huangdi? page)
The State of Yen's Assasination
The state of Yen acted like they surrendered and brought peace offerings to the powerful king: one was a map of Yen's conquests to flatter the king, and the second one was a head of a Chin general. But these were only props to distract the king. As the men showed the gifts, (the men were real professional assassins) they took out a small knife and attacked the king in hesitation. The king knew they were quite suspicious in their body language, but they didn't attack until the king noticed. He thought it was a usual habit of stage fright. But the king was a real warrior who fights in war. So he was able to protect himself, but this feared him. But no one, even his soldiers didn't make a move and just guarded the place when the king was close to his death! That was a large failure of his security system failed.
From that day on, the king's dreams were all nightmares. Nightmares of death. Nightmares of the souls he killed. He thought the spirits he killed may come and get him someday and torture him. He needed protection. This is when the Terracotta Warriors came alive (see more in the The Warriors, the Tomb and the Wall page).