Evolution has been an important theme in fiction, including speculative evolution in science fiction, since the late 19th century, though it began before Charles Darwin's time, and reflects progressionist and Lamarckist views as well as Darwin's. Darwinian evolution is pervasive in literature, whether taken optimistically in terms of how humanity may evolve towards perfection, or pessimistically in terms of the dire consequences of the interaction of human nature and the struggle for survival. Other themes include the replacement of humanity, either by other species or by intelligent machines.
Charles Darwin's evolution by natural selection, as set out in his 1859 On the Origin of Species, is the dominant theory in modern biology, but it is accompanied as a philosophy and in fiction by two earlier evolutionary theories, progressionism (orthogenesis) and Lamarckism. Progressionism is the view that evolution is progress towards some goal of perfection, and that it is in some way directed towards that goal. Lamarckism, a philosophy that long predates Jean-Baptiste de Lamarck, is the view that evolution is guided by the inheritance of characteristics acquired by use or disuse during an animal's lifetime.
Ideas of progress and evolution were popular, long before Darwinism, in the 18th century, leading to Nicolas-Edme Rétif's allegorical 1781 story La découverte Australe par un homme volant (The Southern Hemisphere Discovery by a Flying Man).
The evolutionary biologist Kayla M. Hardwick quotes from the 2013 film Man of Steel, where the villain Faora states: "The fact that you possess a sense of morality, and we do not, gives us an evolutionary advantage. And if history has taught us anything, it is that evolution always wins." She points out that the idea that evolution wins is progressionist, while (she argues) the idea that evolution gives evil an advantage over the moral and good, driving the creation of formidable monsters, is a popular science fiction misconception. Hardwick gives as examples of the evolution of "bad-guy traits" the Morlocks in H. G. Wells's 1895 The Time Machine, the bugs' caste system in Robert Heinlein's 1959 Starship Troopers, and the effective colonisation by Don Siegel's 1956 Invasion of the Body Snatchers aliens.
In French 19th century literature, evolutionary fantasy was Lamarckian, as seen in Camille Flammarion's 1887 Lumen and his 1894 Omega: The Last Days of the World, J.-H. Rosny's 1887 Les Xipéhuz and his 1910 La mort de la terre, and Jules Verne's 1901 La grande forêt, le village aérien. The philosopher Henri Bergson's creative evolution driven by the supposed élan vital likely inspired J. D. Beresford's English evolutionary fantasy, his 1911 The Hampdenshire Wonder.
Darwin's version of evolution has been widely explored in fiction, both in fantasies and in imaginative explorations of its grimmer "survival of the fittest" effects, with much attention focused on possible human evolution. H. G. Wells's The Time Machine already mentioned, his 1896 The Island of Dr Moreau, and his 1898 The War of the Worlds all pessimistically explore the possible dire consequences of the darker sides of human nature in the struggle for survival. More broadly, Joseph Conrad's 1899 Heart of Darkness and R. L. Stevenson's 1886 Dr Jekyll and Mr Hyde portray Darwinian thinking in mainstream English literature.
The evolutionary biologist J. B. S. Haldane wrote an optimistic tale, The Last Judgement, in the 1927 collection Possible Worlds. This influenced Olaf Stapledon's 1930 Last and First Men, which portrays the many species that evolved from humans in a billion-year timeframe. A different take on Darwinism is the idea, popular from the 1950s onwards, that humans will evolve more or less godlike mental capacity, as in Arthur C. Clarke's 1950 Childhood's End and Brian Aldiss's 1959 Galaxies Like Grains of Sand. Another science fiction theme is the replacement of humanity on Earth by other species or intelligent machines. For instance, Olof Johannesson's 1966 The Great Computer gives humans the role of enabling intelligent machines to evolve, while Kurt Vonnegut's 1985 Galapagos is one of several novels to depict a replacement species.