A ghost story may be any piece of fiction, or drama, that includes a ghost, or simply takes as a premise the possibility of ghosts or characters' belief in them.  The "ghost" may appear of its own accord or be summoned by magic. Linked to the ghost is the idea of "hauntings", where a supernatural entity is tied to a place, object or person. Colloquially, the term "ghost story" can refer to any kind of scary story. In a narrower sense, the ghost story has been developed as a short story format, within genre fiction. It is a form of supernatural fiction and specifically of weird fiction, and is often a horror story. While ghost stories are often explicitly meant to be scary, they have been written to serve all sorts of purposes, from comedy to morality tales. Ghosts often appear in the narrative as sentinels or prophets of things to come. Belief in ghosts is found in all cultures around the world, and thus ghost stories may be passed down orally or in written form. 
Spirits of the dead appear in fiction as early as Homer's Odyssey, which features a journey to the underworld and the hero encountering the ghosts of the dead. The Old Testament features the Witch of Endor calling the spirit of the prophet Samuel. Pliny the Younger in his letters describes a ghost which would become familiar in later literature: a bearded spirit rattling chains. The play Mostellaria, by the Roman playwright Plautus, is the earlier known work to featured a haunted dwelling, and is sometimes translated as The Haunted House.  Ghosts often appeared in the tragedies of the Roman writer Seneca, which in turn influenced William Shakespeare's plays. The ghosts in Richard III resemble the Senecan model, while the ghost in Hamlet plays a more complex role.
Historian of the ghost story Jack Sullivan has noted that many literary critics argue a "Golden Age of the Ghost Story" existed between the decline of the Gothic novel in the 1830s and the start of the First World War. Sullivan argues that the work of Edgar Allan Poe and Sheridan Le Fanu inaugurated this "Golden Age".
Around the world
Britain and Ireland
One of the most influential writers of ghost stories was the Irish author Sheridan Le Fanu. Le Fanu's collections, such as In a Glass Darkly (1872) and The Purcell Papers (1880), helped popularise the short story as a medium for ghost fiction. Charlotte Riddell, who wrote fiction as Mrs. J. H. Riddell, created ghost stories which were noted for adept use of the haunted house theme.
A key British writer of ghost fiction was M. R. James, whom David Langford has described as writing "the 20th century's most influential canon of ghost stories". In "Some Remarks on Ghost Stories" (1929), James identified five key features of the English ghost story, as summarized by Prof. Frank Coffman for a course in popular imaginative literature:
- The pretense of truth
- "A pleasing terror"
- No gratuitous bloodshed or sex
- No "explanation of the machinery"
- Setting: "those of the writer's (and reader's) own day"
In the Edwardian era, Algernon Blackwood (who combined the ghost story with nature mysticism), Oliver Onions (whose ghost stories drew on psychological horror), and William Hope Hodgson (whose ghost tales also contained elements of the sea story and science fiction) helped move the ghost story in new directions.
A noted modern British writer of ghost fiction is Ramsey Campbell. Another is British/Irish writer Jonathan Aycliffe (Denis MacEoin), who has written ten full-length novels in the genre. In this he compares with Susan Hill, who has written about three ghost story novels. The full-length ghost story is still rare.
Influenced by British and German examples, American writers began to produce their own ghost stories. Washington Irving wrote "The Adventure of the German Student" and  Edgar Allan Poe wrote some stories which contain ghosts, such as "The Masque of the Red Death" and "Morella".
Beginning in the 1940s, Fritz Leiber wrote ghost tales set in modern industrial settings, such as "Smoke Ghost" (1941) and "A Bit of the Dark World" (1962). Shirley Jackson made an important contribution to ghost fiction with her novel The Haunting of Hill House. 
The Arabian Nights contains a number of ghost stories, often involving jinn, ghouls and corpses. Other medieval Arabic literature, such as the Encyclopedia of the Brethren of Purity, also contain ghost stories.
- Bailey, Dale. American Nightmares: The Haunted House Formula in American Popular Fiction, Bowling Green, OH: Popular Press, 1999. ISBN 0-8797-2789-6.
- Felton, D. (1999). Haunted Greece and Rome: Ghost Stories from Classical Antiquity. University of Texas Press. ISBN 0-292-72508-6..
- Ashley, Mike, Editor. Phantom Perfumes and Other Shades: Memories of GHOST STORIES Magazine, Ash-Tree Press, 2000.
- Joynes, Andrew (editor), Medieval ghost stories: an anthology of miracles, marvels and prodigies Woodbridge: Boydell press, 2003.
- Locke, John, Editor. Ghost Stories: The Magazine and Its Makers: Volumes 1 & 2, Off-Trail Publications, 2010.
- Sullivan, Jack. Elegant Nightmares: The English Ghost Story From Le Fanu To Blackwood, Ohio University Press, 1978. ISBN 0-8214-0569-1.
- Darrell Schweitzer, "Ghosts and Hauntings" in: Westfahl, Gary, ed. The Greenwood Encyclopedia of Science Fiction and Fantasy: Themes, Works, and Wonders. Westport, CT: Greenwood, 2005. pp. 338-340.
- D. Felton, Haunted Greece and Rome: Ghost Stories from Classical Antiquity. University of Texas Press, 2010 ISBN 0292789246, (p. 50-51)
- Jack Sullivan, "Golden Age of the Ghost Story", in The Penguin Encyclopedia of Horror and the Supernatural, Viking Press, 1986, ISBN 0-670-80902-0 (pp. 174-6).
- J. L. Campbell, Sr., "J. S. Le Fanu", in E. F. Bleiler, ed. Supernatural Fiction Writers (New York: Scribner's, 1985). ISBN 0-684-17808-7
- J. L. Campbell, Sr., "Mrs. J. H. Riddell", in Bleiler, ed., Supernatural Fiction Writers.
- David Langford, "James, Montague Rhodes", in David Pringle, ed., St. James Guide to Horror, Ghost & Gothic Writers (London: St. James Press, 1998). ISBN 1558622063
- Frank Coffman. "Excerpts from 'Some Remarks on Ghost Stories'". Retrieved 20 July 2012.
- S. T. Joshi, Ramsey Campbell and Modern Horror Fiction (Liverpool: Liverpool University Press, 2001), pp. 53–63. ISBN 0-85323-765-4
- Andrew Barger, "Introduction:All Ghosts are Grey" in Barger (editor),The Best Ghost Stories 1800-1849: A Classic Ghost Anthology. Bottletree Books LLC, 2011. ISBN 1933747331, (p. 7-12)
- Brooks Landon, "The Short fiction of Leiber", in Frank N. Magill, ed. Survey of Modern Fantasy Literature, Vol 4. Englewood Cliffs, NJ: Salem Press, Inc., 1983. ISBN 0-89356-450-8 (pp. 1611-1615).
- Jack Sullivan, "Shirley Jackson", in Bleiler, ed., Supernatural Fiction Writers. (pp.1031-1036).
- "Kwaidan", by Brian Stableford, in Frank N. Magill, ed., Survey of Modern Fantasy Literature, Vol 2. Englewood Cliffs, NJ: Salem Press, Inc., 1983, ISBN 0-89356-450-8 (pg. 859-860).
- The Best Ghost Stories at Project Gutenberg - 1919
- PDF of original 1919 The Best Ghost Stories
- Audio recording of a traditional ghost story from Labrador, Canada
- Ghost Story Society