The Marauders Map is a magical document that shows the plan of Hogwarts School and tracks the movements of everyone inside it. The official Harry Potter encyclopedia describes it as a magical map that revealed the plan for Hogwarts and tracked its human and ghostly inhabitants and their movements, using the Homonculous Charm. It was created by four students, Remus Lupin, Sirius Black, Peter Pettigrew and James Potter, and passed from them to Fred Weasley and George Weasley, and finally to Harry Potter. An earlier version of this page credited the map's person-revealing function to the spell Homenum Revelio; the official record instead names the Homonculous Charm, and the page has been corrected to follow the source.
The map looks like a blank piece of parchment until it is activated. The official fact file records the ritual precisely: a tap of a wand and the words "I solemnly swear that I am up to no good" reveal it, and another tap plus the words "Mischief managed" hide it again. Once open, it shows the castle's layout and the tracked people as labelled points, and it is, in the encyclopedia's words, "not fooled by Invisibility Cloaks, Polyjuice Potion or Animagi". The parchment was also designed, the fact file notes, specifically to insult Severus Snape if he came across it.
J.K. Rowling's own essay on the map adds the makers' side of the story. Their nighttime exploration was driven partly by mischief but mainly to help Lupin with his lycanthropy before the Wolfsbane Potion existed; his three friends became unregistered Animagi to accompany him safely, and the castle's interior was charted with the help of James's Invisibility Cloak. She also clarifies that the makers' map nicknames were "Messrs Moony, Wormtail, Padfoot and Prongs", and that the activating phrase's "no good" meant rule-breaking, never Dark magic.
The official fact file lists the map's appearances as Prisoner of Azkaban, Goblet of Fire, Order of the Phoenix, Half-Blood Prince and Deathly Hallows, all five later novels. Rowling's essay reconstructs its ownership chain: the makers were likely cornered by caretaker Argus Filch in their final year, possibly tipped off by Snape, and the map was confiscated and never retrieved by them. The Weasley twins later acquired it, gave it to Harry, and, in Rowling's phrase, unwittingly passed it on to the child of one of the creators. It was taken from Harry a second time by "a Death Eater in disguise at the school", who recognised it as a likely means of his own exposure.
Rowling closes her essay with a writer's admission: the map "allowed Harry a little too much freedom of information", and she never showed Harry retrieving it from the impostor's office. She kept it in the story partly because Harry watching Ginny Weasley's marker in Deathly Hallows pleased her. A fuller account of how the document was made is kept at Marauders Map Creation.