Comets have appeared in numerous works of fiction. One of the earliest such works is Edgar Allan Poe's 1839 short story "The Conversation of Eiros and Charmion", wherein the Earth's atmosphere is lost to a comet, with catastrophic results. Destruction is also caused by impact events in works such as the 1977 novel Lucifer's Hammer by Larry Niven and Jerry Pournelle, and the impact of Comet Shoemaker–Levy 9 on Jupiter in 1994 was satirized by Terry Pratchett in his 1998 Discworld novel The Last Continent. Looming threats posed by comets are depicted in many works including Dennis Wheatley's 1939 novel Sixty Days to Live. Conversely, H. G. Wells' 1906 novel In the Days of the Comet provides a rare example of positive effects arising from Earth encountering a comet, the gases in the comet's tail altering the atmosphere in a way that transforms human character for the better.
Besides comets coming to Earth, they are also visited by humans in some stories such as the 1986 novel Heart of the Comet by Gregory Benford and David Brin which depicts an expedition to Halley's Comet; these concepts are combined in Jules Verne's 1877 novel Hector Servadac (English title: Off on a Comet) where a cometary encounter with Earth results in a number of humans traversing the Solar System with the comet. Several stories depict the extraction of resources, mainly water, from comets; one such story is the 1992 novel Mining the Oort by Frederik Pohl. A few works such as Arthur C. Clarke's 1975 novel Imperial Earth and Robert S. Richardson's 1946 short story "The Blindness" feature anthropomorphized thinking comets, and Diana Wynne Jones' 2007 novel The Game depicts an outright personified one.