The Pied Piper volunteees to get rid of an army of rats which have invaded the village of Hamlein. By playing the pipe, he hypnotize and puts them in pursuit of a cheese which does not exist. When the mayor shows himself thankless and gives him a golden coin instead of the bag promises. The piper takes revenge hypnotizing all the children of the village and by taking them forever in an enchanted world using the pipe.
It is unknown if the pipe itself has magical power or if it is the specific tune that is played that hypnotises.