(In the year 1284 on the day of [Saints] John and Paul on 26th June 130 children born in Hamelin were led away by a piper [clothed] in many colors to [their] Calvary near the Koppen, [and] lost)
The quote above is from a manuscript written in the mid 15th century by a German monk. It is the oldest known account of the legend of the Pied Piper of Hamelin.
Here is a quick recap of the legend. Pied Piper comes to the town of Hamelin and offers to get rid of the town’s rats. He plays his flute, and the rats follow him out of town. When the Piper returns to town, the Mayor refuses to pay him. So, he leads all of the townspeople’s children out of town in revenge.
Historians are fairly sure that the rat part was added later or taken from another tale, probably one related to the Great Plague. It is thought that the children were led out of town to repopulate Eastern Europe, either Poland or Romania. There are two theories about who the children were. Either they were orphans and illegitimate children or they were the offspring of large families who could not support them.
The Piper himself was probably paid by the government to relocate members of the overcrowded towns to far off lands to ease over population, a pre-Hitler kind of thing. Always remember to pay the Piper.