The Great Human and Monster Wars

This event was the origin of Undertale's story.

Context
Humans declared war on the monsters because they feared the monsters' power.

Battle(War)
We do not know about how the war started or who attacked first, however, the information coming from Undertale and Camila tells us that the humans weren't attacking for no reason;  the monsters were able to capture humans soul in order to be invincible, and coming from the AMD: Monsters were able to use magic without any kind of regulation. Their weaknesses were that they couldn't capture a single monster soul because their souls break quickly.

In the game, it was said that "countless monsters died during the battle" which means that the monster's causalities are really high.

At the end of the war, the monsters were deported to the Underground which would be their new home. However, there were monsters who ignored Roy Goldburn's orders and decided to defect and live a hidden life in the Surface. Centuries later, the AMD took that role to track down the remaining monsters and monitor the barrier.

Trivia

 * It is highly possible that humans had a reason to declare war on monsters.
 * Just like Asgore, Gaster was alive at the war time
 * There was one "special" monster that Roy was tracking down with the four other wizards (Mila Rutrow, Rin Winterway, Shane Goldburn, Kody Fallenfire) and this monster may be the one that made them disappear