Han Feizi was born in 279 B.C. He would soon create Legalism as we know it.
Han Feizi did not like the teachings of the philosopher Xunzi, and sought to make his own views heard.
No one seemed to think his views were worth listening to, so Feizi decided to write them down.
Blah blah blah, Confucianism is great :D
He believed that people were naturally evil, and needed harsh laws and punishments to keep people straight.
He wrote that they needed a strong ruler, who didn't need to show compassion or sympathy.
During this time, the Xin dynasty was in power. They read this and adopted the views.
Blah Blah, Legalism is great :D
In fact, anything that was written that wasn't about Legalism was burnt, and the writers were executed.
ANYONE WHO DOESN'T WORSHIP LEGALISM WILL BE PUNISHED
The people were not happy with the way things were being run. Eventually, the death of the first emperor and civil war that followed suit, combined with the harsh forces of legalism, would lead to the fall of the Xin empire. Floods and droughts followed, but the final nail in the coffin was the emperor(Qin Shi Huang)'s son dying.
After the fall of the Xin empire, a petty official named Gaozu became general. Legalism was a thing of the past, and Confucianism was adopted.