Wells had considered the notion of time travel before, in a short story titled "The Chronic Argonauts" (1888). This work, published in his college newspaper, was the foundation for The Time Machine. Wells frequently stated that he had thought of using some of this material in a series of articles in the Pall Mall Gazette, until the publisher asked him if he could instead write a serial novel on the same theme. Wells readily agreed and was paid £100 (equal to about £10,000 today) on its publication by Heinemann in 1895, which first published the story in serial form in the January to May numbers of The New Review (newly under the nominal editorship of W. E. Henley). Henry Holt and Company published the first book edition (possibly prepared from a different manuscript) on 7 May 1895; Heinemann published an English edition on 29 May. These two editions are different textually and are commonly referred to as the "Holt text" and "Heinemann text", respectively. Nearly all modern reprints reproduce the Heinemann text.
The story reflects Wells's own socialist political views, his view on life and abundance, and the contemporary angst about industrial relations. It is also influenced by Ray Lankester's theories about social degeneration and shares many elements with Edward Bulwer-Lytton's novel Vril, the Power of the Coming Race (1871). Other science fiction works of the period, including Edward Bellamy's novel Looking Backward: 2000-1887 (1888) and the later film Metropolis (1927), dealt with similar themes.
This work is an early example of the Dying Earth subgenre. The portion of the novel that sees the Time Traveller in a distant future where the sun is huge and red also places The Time Machine within the realm of Eschatology, i.e. the study of the end times, the end of the world, and the ultimate destiny of mankind.