The story's main character is a British historian named Anderson who travels to the town of Viborg in Denmark to do some research. During the course of his research, Anderson discovers that, in the early 16th century, Viborg was home to a man accused of witchcraft whose name was Nicolas Francken. Anderson stays in room 12 at the Golden Lion hotel. The Golden Lion is one of the oldest buildings in Viborg because it was one of the few structures to survive a devastating fire in 1726. A blackboard in the hotel lists all the rooms and the names of their occupants. Anderson sees that there is no room 13 listed on the blackboard. He does, however, see a door with the number 13 on it next to his own room. Anderson later realizes that room number 13 only appears at night and vanishes in the daytime.
Readers should be aware that "Number 13" is peppered with Danish and Latin words and phrases which are mostly left untranslated.
The story has been adapted to other media, most notably as the tenth TV movie in the BBC series A Ghost Story for Christmas.
The British scholar Anderson goes to the Danish town of Viborg to carry out some research into the history of Christianity in Denmark in the early sixteenth century, a time when Protestantism was replacing Roman Catholicism as the country's dominant religion. Viborg is an attractive town, although most of the buildings in it are relatively new. Most of the town was destroyed by the Great Fire in 1726. One building that survived the fire is now the Golden Lion hotel, the hotel in which Anderson stays. On arrival at the hotel, Anderson says that he needs a large room where he can both sleep and work. The room must have plenty of light and must not be too dark in the afternoon. Anderson is invited to choose his own room. He selects room number 12, a room with three large windows that look out onto the street.
When he goes down to dinner, Anderson sees a blackboard which lists all the rooms and the names of their occupants. He sees that there is no room number 13 on the list, which is not unusual in Denmark. Before going to sleep, Anderson wants to do some reading. He realizes that he left the book that he wants to read in the pocket of his coat which is hanging on a peg outside the dining room. He goes down to get the book. He goes back to what he thinks is his room but finds that he cannot open the door. He then sees that the door is not that of his room but the one of room number 13. Anderson thinks it is strange that there is a room 13 but it is not listed on the blackboard. He reasons that the room might be used by hotel staff. After having blown out the candle and left his room partially lit by the streetlamp outside, Anderson notices that it looks smaller than it did in the daytime.
The following day, Anderson goes to the town's records office. He is shown letters to and from Bishop Friis, the last Roman Catholic Bishop of Viborg. The letters frequently refer to a house in Viborg which Bishop Friis owned but in which he did not live. The person who rented the house from the bishop was a man named Nicolas Francken who was accused of practicing witchcraft and having sold his soul to the Devil. In the last letter which Anderson finishes reading before the records office closes for the evening, Bishop Friis says that, if anyone has any evidence against Nicolas Francken, it should be presented before a Church court. Anderson just has time to glance at a letter from Rasmus Nielsen, the leader of the town's Protestant community, which says that courts of the Roman Catholic Church no longer have any authority in Denmark.
On leaving the records office, Anderson speaks to Herr Scavenius, the keeper of the archives. Herr Scavenius has heard of the house that Bishop Friis rented to Nicolas Francken but does not know where it was. The part of the archive which would reveal that information is missing.
That evening, Anderson remembers that he forgot to ask the landlord why room number 13 was not listed on the blackboard. He decides to check first that there really is a room 13. He sees that there is and hears footsteps and a voice coming from behind its door. When Anderson approaches the door, it sounds as if the footsteps have stopped behind it. Anderson also hears a, "quick hissing breathing, as of a person in strong excitement."
Back in his room, Anderson notices that, once again, it looks smaller than it does in daylight. He goes to get something from his suitcase, which the porter left on a small stool by the wall. He cannot find the suitcase. He thinks that the hotel staff must have unpacked it and put its contents in a closet. When he looks in the closet, he sees that his possessions are not There. He decides to speak to the maid about it in the morning.
Anderson goes to the right hand window of his room to smoke a cigarette. The light is behind Anderson and he can see his own shadow on the wall of a building across the street. He can also see the shadow of the man in room number 11 and the shadow of a tall thin person in room number 13. Anderson cannot tell if the person is a man or a woman. There appears to be a flickering red light in the room.
In the morning, Anderson politely but firmly tells the maid not to move his suitcase and asks her where the suitcase is. The maid simply laughs and leaves the room. Anderson then sees that his suitcase is on the stool by the wall where the porter left it. The room also appears to be larger than it did the night before. Anderson finds his cigarette end on the sill of the middle one of the three windows, which surprises him because he is certain that he was at the right hand window when he smoked it. When Anderson leaves his room, he sees a pair of men's shoes outside the door of room 13. He thinks this must mean that the shadow he saw the night before was that of a man. He then notices that the shoes are outside room 14. There is no room 13 between rooms 14 and 12.
At the records office, Anderson finds that there is only one more letter that refers to Nicolas Francken. It is a letter from Bishop Friis to the Protestant leader Rasmus Nielsen, written two days after the letter which Nielsen sent to the bishop. In the letter, Bishop Friis says that Nielsen is wrong to claim that Roman Catholic Church courts no longer have any authority in Denmark but there will not be any case brought against Nicolas Francken because he, "hath been suddenly removed from among us". Anderson concludes that Nicolas Francken must have died suddenly and unexpectedly.
Back at the Golden Lion, Anderson asks the hotel's landlord, Herr Kristensen, why Danish hotels do not have a room 13. Herr Kristensen says that he is not superstitious himself but that most of his guests would refuse to sleep in a room with that number. Anderson asks what room number 13 in the Golden Lion is used for. Herr Kristensen says that there is no room 13 in the Golden Lion and that the room next to Anderson's is room number 14. Anderson says that he saw a room 13 the previous night and the night before but Herr Kristensen just laughs. Anderson still wants to discuss the matter of room 13 further with Herr Kristensen, He invites the landlord to come to his room later to smoke a cigar and to look at some photographs of English towns.
Anderson approaches his room by way of room 11. He has unpacked his suitcase and put it away. Once again, however, his room looks smaller than it does in the daytime. Anderson sees the shadow of what he now thinks must be the occupant of room number 14 on the wall of the building across the street. He knows that room 14 is occupied by a serious man, a lawyer named Herr Anders Jensen. Anderson is surprised to see that the shadow is that of a dancing man, although he cannot hear the sound of any footsteps coming from the neighboring room.
Herr Kristensen arrives. Before Anderson has the chance to bring up the topic of room 13, their conversation is interrupted by the horrible sound of singing in a, "high thin voice... dry, as if from long disuse." Anderson and Herr Kristensen think that Herr Jensen in room 14 must be either mad or drunk. Herr Jensen comes to Anderson's room to complain about the noise. He soon realizes that neither Anderson nor Herr Kristensen could have been making the noise. The sound is heard again. Anderson asks Herr Jensen if there is another room between numbers 14 and 12. Herr Jensen says that there was not one that morning but is not sure if there is or is not one there now.
The three men go to investigate. They see a door with number 13 on it and a light coming from underneath it. They try to push the door open but it remains firmly shut. Herr Kristensen is told to fetch the hotel's strongest member of staff. After he goes, the door opens. An arm with long gray hair on it in a ragged yellow sleeve emerges. It tries to grab Herr Jensen, who has his back to the door, but Anderson pulls him away in time. The door then closes and a laugh is heard. Herr Kristensen returns with two staff members who are armed with crowbars. One of them strikes at the door but finds that he has hit the wall between rooms 12 and 14. Room 13 has vanished. At that moment, a rooster is heard crowing and the sky begins to grow lighter. Herr Kristensen offers to put Anderson and Herr Jensen in a different room.
The following morning, the floorboards in the part of room 12 nearest to room 14 are lifted up. The only thing that is found beneath them is a small copper box. Inside the box is a piece of parchment with some writing on it. Both Anderson and Herr Jensen, who is interested in old documents, are excited by the discovery. Unfortunately, the writing is in a script which is completely unknown to both men and they are unable to decipher it.
Under the title "Room 13", the story was adapted as an episode of the American TV series Great Ghost Tales. It was first shown on NBC in 1951. The episode is now believed to be lost. Also under the title "Room 13", the story was adapted as an episode of the British TV series Mystery and Imagination. The episode, in which Joss Ackland played Herr Scavenius, was first broadcast on Britain's ITV network on October 22, 1965. It is also now believed to be lost.
Christopher Lee reads an abridged version of "Number 13" in the third episode of the BBC TV mini-series Christopher Lee's Ghost Stories for Christmas. The episode first aired on British television on December 29, 2000.
"Number 13" was adapted as the tenth TV movie in the BBC series A Ghost Story for Christmas. The film was first shown on British television on December 22, 2006. It stars Greg Wise as Anderson, David Burke as Gunton (equivalent to Herr Kristensen from the original story), Tom Burke as Edward Jenkins (equivalent to Herr Jensen from the original story) and Paul Freeman as Harrington (equivalent to Herr Scavenius from the original story). The action is moved from Denmark to an unnamed small English cathedral city. Anderson, a professor from Oxford University, is invited there to catalog the manuscripts in the cathedral's library. The task of cataloging the manuscripts had been begun by a lecturer from Cambridge University but he left it unfinished. At the Golden Lion, Anderson is asked to pay for his room in advance. There had been a previous incident when a man named Entwhistle, a lecturer from Cambridge University, suddenly left one night without paying his bill. Fearing that the interest which Anderson is showing in certain documents will lead to rumors of a "witch house" in the city, Harrington tells the professor to stop working at the library and go back to Oxford. When the floorboards in room 12 are lifted up, the clothes and other possessions of Mr. Entwhistle, the Cambridge University lecturer who suddenly disappeared from the hotel one night, are found underneath them.
A fifteen-minute radio play based on "Number 13" was produced as part of the five-part mini-series M.R. James Ghost Stories. The play first aired on BBC Radio 4 in the United Kingdom on December 28, 2007. In spite of the program's short running time, the adaptation is a largely faithful one. There are, however, some notable differences from the original short story. The characters of Herr Kristensen and Herr Jensen are combined into a single character named Herr Lundt. The story is told in the form of a series of letters which Anderson writes to his fiancée Kate. The last of those letters is never sent, or even written. Anderson says, "I write this letter to you in my heart only". Anderson does not return to England alive. He dies when he falls from the steamship on which he is traveling back from Denmark. His death may or may not be accidental.
- In the four-part BBC TV mini-series Christopher Lee's Ghost Stories for Christmas, first shown on British television in December 2000, Christopher Lee plays M.R. James, telling his ghost stories by candlelight to friends and students at King's College, Cambridge on Christmas Eve. Other stories told in the series are "The Stalls of Barchester Cathedral", "The Ash-tree" and "A Warning to the Curious".
- The BBC series A Ghost Story for Christmas is made up of fifteen TV movies that were first shown on British television between 1971 and 2021. Of the other fourteen films in the series, three are original stories. The rest are adaptations of the short stories "The Stalls of Barchester Cathedral", "A Warning to the Curious", "Lost Hearts", "The Treasure of Abbot Thomas", "The Ash-tree', "A View from a Hill", "Oh, Whistle, and I'll Come to You, My Lad", "The Tractate Middoth", "Martin's Close" and "The Mezzotint" by M.R. James and the short story "The Signalman" by Charles Dickens.
- Other episodes of the BBC radio mini-series M.R. James Ghost Stories, which first aired in December 2007, are based on "Oh, Whistle, and I'll Come to You, My Lad", "The Tractate Middoth", "Lost Hearts" and "The Rose Garden". Each episode is introduced by Derek Jacobi in the character of M.R. James.