I think it was the first book of Zelazny's Amber series where the main character Corwin has a chat with his retired military buddy while on an excursion to our world. The buddy wonders aloud if we're all characters in a novel, and Corwin replies, "If so, I'd like to shoot the author."

What was the earliest sci-fi novel that engaged in this kind of self-reference? The Saragossa Manuscript, written slightly over two centuries ago, is heavily imbued with this motif, but it's hard to classify it as fantasy, let alone sci-fi.

  • Nesfa has recursive SF, TVTropes has Genre Savvy; I'd start with those.
    – DavidW
    Jan 25, 2020 at 0:50
  • 2
    Regarding the first five-book Amber series: In the fourth book, Corwin actually bumped into a guy named "Roger," with a physical description strongly resembling the real-life Roger Zelazny, who said he was currently working on "a philosophical romance shot through with elements of horror and morbidity." However, he refused to tell Corwin whether or not the hero of the story would ever get a happy ending.
    – Lorendiac
    Jan 25, 2020 at 2:40
  • 1
    Nesfa's recursive SF
    – sjl
    Jan 25, 2020 at 23:33
  • OK. Finally looked at NESFA definition as well as A and B within the list. Talk about something being too general! Merely mentioning the term 'science fiction' or having a scene occur at a science fiction convention "counts" as recursive. I'm asking about a book (or at least a story) where the characters show awareness that they're inside a book, or they find a book with the same title of the book that they've been written into.
    – Martin
    Jan 27, 2020 at 3:19
  • Why the insistence on novels? Would you consider amending your question to include self-referential novellas, novelettes, and short stories?
    – user14111
    Jan 27, 2020 at 8:10

6 Answers 6


An example that is light on the science fiction but very heavy on the metafiction is The Life and Opinions of Tristram Shandy, Gentleman, by Laurence Sterne, published over nine volumes from 1759 to 1767.

The novel is famous for pioneering many aspects of metafiction. In particular, the actual life of the protagonist—the putative subject of the novel—frequently takes a back seat to his digressions about his family and acquaintances, and his direct addresses to the reader. For example, book 5, chapter 8 begins:

Stay——I have a small account to settle with the reader before Trim can go on with his harangue.—It shall be done in two minutes.

As the science fiction aspect, chapter 2 of book 1 (reproduced in full below) gives an attempt to provide a scientific sort of explanation, based on what was believed in Sterne's time about human conception and gestation, of how an ill-timed question interfered with Tristram Shandy's proper prenatal development.

———Then, positively, there is nothing in the question that I can see, either good or bad.——Then, let me tell you, Sir, it was a very unseasonable question at least,—because it scattered and dispersed the animal spirits, whose business it was to have escorted and gone hand in hand with the HOMUNCULUS, and conducted him safe to the place destined for his reception.

The Homunculus, Sir, in however low and ludicrous a light he may appear, in this age of levity, to the eye of folly or prejudice;—to the eye of reason in scientifick research, he stands confess’d—a Being guarded and circumscribed with rights.——The minutest philosophers, who, by the bye, have the most enlarged understandings (their souls being inversely as their enquiries), shew us incontestably, that the Homunculus is created by the same hand,—engender’d in the same course of nature,—endow’d with the same locomotive powers and faculties with us:—That he consists as we do, of skin, hair, fat, flesh, veins, arteries, ligaments, nerves, cartilages, bones, marrow, brains, glands, genitals, humours, and articulations;—is a Being of as much activity,—and, in all senses of the word, as much and as truly our fellow-creature as my Lord Chancellor of England.—He may be benefited,—he may be injured,—he may obtain redress;—in a word, he has all the claims and rights of humanity, which Tully, Puffendorf, or the best ethick writers allow to arise out of that state and relation.

Now, dear Sir, what if any accident had befallen him in his way alone!—or that, through terror of it, natural to so young a traveller, my little Gentleman had got to his journey’s end miserably spent;—his muscular strength and virility worn down to a thread;—his own animal spirits ruffled beyond description,—and that in this sad disordered state of nerves, he had lain down a prey to sudden starts, or a series of melancholy dreams and fancies, for nine long, long months together.—I tremble to think what a foundation had been laid for a thousand weaknesses both of body and mind, which no skill of the physician or the philosopher could ever afterwards have set thoroughly to rights.

The scientific theory involved here is "preformationism," which asserted that the fetus begins as a miniature human, complete in every regard. Specifically, the view that prevailed in eighteenth-century Britain asserted that a whole miniature person (the "homunculus") was carried by the father's sperm, while the mother's womb nurtured and helped to shape it while it grew. As part of this, the mother must contribute the essences and humors that will fill the body as it increases in size.

The story asserts that this alleged gestation process has been upset by the circumstances surrounding Shandy's conception (an inopportune and unromantic question that his mother asked his father while they were copulating). The "animal spirits" are not assembled quite right in his body, so he was doomed to a troubled existence from nine months before birth. Of course, this is all meant to be humorous, but it is still arguably a science fiction element.

  • That's awesome! I think we have a winner! (Unless someone can find a reasonable candidate for qualifying SF or fantasy content in the words of the chorus (which typically spoke to the audience) of a play by Aristophanes...)
    – DavidW
    Jan 25, 2020 at 2:48
  • 2
    I wouldn't call that a science fiction element. From the perspective of many people of the time including possibly the author, it was just real-world science, just as a modern writer of fiction might argue that their character is doomed to be unlucky by their genes or socialization. Further, it is not clear from the text whether Tristram is even proposing the homunculus theory as a an explanation for his troubles or just mocking it.
    – Adamant
    Jan 25, 2020 at 7:05
  • 1
    It's good to point this story out, but it's not clear that it answers the question. It's the narrator here (outside the story) breaking the fouth wall, while telling us the story. The example OP gave indicates that they want a character in the midst of the story do this.
    – Spencer
    Jan 25, 2020 at 15:28
  • I agree with Spencer, so I'm not voting for this answer, interesting as it is.
    – Martin
    Jan 27, 2020 at 3:11

1940: Typewriter in the Sky, a novel by L. Ron Hubbard, first published as a two-part serial in Unknown Fantasy Fiction, November 1940 and Unknown Fantasy Fiction, December 1940, available at the Internet Archive: part one, part two.

From the Wikipedia page for this novel:

Typewriter in the Sky is a science fantasy novel by American writer L. Ron Hubbard. The protagonist Mike de Wolf finds himself inside the story of his friend Horace Hackett's book. He must survive conflict on the high seas in the Caribbean during the 17th century, before eventually returning to his native New York City. Each time a significant event occurs to the protagonist in the story he hears the sounds of a typewriter in the sky. At the story's conclusion, de Wolf wonders if he is still a character in someone else's story. The work was first published in a two-part serial format in 1940 in Unknown Fantasy Fiction. It was twice published as a combined book with Hubbard's work Fear. In 1995 Bridge Publications re-released the work along with an audio edition.

Editorial blurb from Unknown Fantasy Fiction, November 1940:

An author put his friend in a story of Caribbean piracy—as the villain! And the friend could not get out, and was forced to live that story!

Famous quotation from end of story. Mike is (SPOILER) back in the real world:

Ah, yes. The fate. It was his luck to meet somebody in a story and then return without her. It was his luck. But you couldn't expect the breaks all the time. You couldn't ask luck to run your way forever. He had had her for a little while, in a land ruled by a typewriter in the clouds. And now he was out of that and there was no type—

Abruptly Mike de Wolf stopped. His jaw slacked a trifle and his hand went up to his mouth to cover it. His eyes were fixed upon the fleecy clouds which scurried across the moon.

Up there—


In a dirty bathrobe?

  • Yes good example, but it seems to have been predated by Burroughs, as noted in the NESFA compilation (which really sprawls and stretches the definition of self-referential IMO) under Burroughs, Edgar Rice, Tarzan and the Lion Man (1933 or 1934): Hollywood comes to Africa to shoot a "Tarzan" film on location. When the company is bedeviled by the usual problems of cannibals, gorillas, and the like it is up to the real Tarzan to save them.
    – Martin
    Jan 27, 2020 at 3:12
  • However, the Tarzan story is more like a self-referential character, rather than a self-referential book.
    – Martin
    Jan 27, 2020 at 3:15
  • The final chapter of Karel Capek's War with the Newts is titled "The Author Talks to Himself" (translated from the original Czech published in 1936).
    – Martin
    Jan 27, 2020 at 4:00
  • I can't find my copy of War with the Newts at the moment, but I seem to recall that the epilogue has the author himself, not a character in the story, discussing the story, so how is that self-referential?
    – user14111
    Jan 27, 2020 at 5:56
  • Good point, but notice that I inserted that comment here, under Tarzan, which I said was not a self-referential book. The final chapter (not called an epilogue by its author, at least not in the translation) is actually the author arguing with himself about the fate of various characters. KSR did something similar by including segments from an author's diary at the start of each chapter of Pacific Edge, last of his Three Californias series, which was a set of three visions not a sequence of three stories.
    – Martin
    Jan 27, 2020 at 6:33

Jorge Luis Borges, in his 1941 story "The Library of Babel", describes a universe filled with an infinite array of library halls, each filled with 410-page books. It is asserted that every possible combination of letters exists somewhere in the Library:

I repeat: In order for a book to exist, it is sufficient that it be possible. Only the impossible is excluded. For example, no book is also a staircase, though there are no doubt books that discuss and deny and prove that possibility, and others whose structure corresponds to that of a staircase.

It's also asserted that the writer's own text can be found there:

This pointless, verbose epistle already exists in one of the thirty volumes of the five bookshelves in one of the countless hexagons - as does its refutation.

  • 2
    Notice that since the books are all 410 pages long, there are not infinitely many of them, despite Borges' assertion to the contrary. It is an inconceivably vast number, however, on the order of 10^700000.
    – Spencer
    Jan 25, 2020 at 15:54
  • 1
    Also see libraryofbabel.info
    – PM 2Ring
    Jan 25, 2020 at 19:31
  • @Spencer I guess you're assuming that the library holds only one copy of every poissible book. Is that stated in the story? I don't recall that, but it's been a ,long time since I read it.
    – user14111
    Jan 25, 2020 at 21:57
  • @user14111 It does, indeed, stated on page 5: sites.evergreen.edu/politicalshakespeares/wp-content/uploads/… "And two, that each book is unique and irreplaceable, but (since the Library is total) there are always several hundred thousand imperfect facsimiles..."
    – Spencer
    Jan 25, 2020 at 22:27
  • derechopenalenlared.com/libros/labyrinths-borges.pdf is a complete (and freely available) translation of Borges' Labyrinths, which contains Library of Babel, as well as an earlier story Garden of Forking Paths which refers to an ancient fictitious book Garden of Forking Paths (which is also the English translation of the title of the 1941 collection in which Library of Babel appeared). Library of Babel is certainly self-referential fantasy but it's predated by Hubbard and Burroughs.
    – Martin
    Jan 27, 2020 at 3:42

1937: The Unholy City, an urban fantasy novel by Charles G. Finney, reviewed at the website Great Science-Fiction & Fantasy Works; another review, by Jonathan Lethem, appeared in The Magazine of Fantasy and Science Fiction, October–November 1998, which is available at the Internet Archive. (Finney is better known for writing The Circus of Dr. Lao.)

The self-referential bit, which occurs near the end of the story, is shown in boldface in this long excerpt which is quoted for context:

And I returned to my green couch. But I halted before it, for someone was in it lying curled on my leaves and blossoms. And my anger mounted to the skies.

"Get out!" I roared. "Get to hell out! Have you sunken so low you would rob a pauper of his bed?" And I cursed the shadowy figure lying there on my green couch of leaves and blossoms, cursed it in the name of Baldad the Suhite, and Eliphaz the Themanite, and Sophar the Naamathite. Such was my fury that I called on the earth gods to open for me a volcano that I might fling this usurper of couches into the menstrual mud of the womb of the world.

Then the shadowy figure amid the leaves and blossoms turned and half arose; and I wanted to cut my throat.

"I did not mean a word I said," I whispered.

"I had no place to sleep," said Frances Shepherd. "I did not know this couch was yours. I will go away."

And she came from the leaf cave and started to go. But I took her hands.

I cread: "No! You cannot go. The plot demands that I keep you. You are the plot's symbol of all that is sweet and gentle and good, the symbol of all that the plot has lacked. What is a plot without simplicity and beauty? You must stay, Frances. Here in the leaf cave, warm on Nature's bosom, you must give me rest and hope and joy; you must assuage my hunger, and cool my thirst."

"Here? With you? I'd rather be in a cage with a tiger. Oh, let me go!"

But I would not let her go. I sought to wrest from her fear and bewilderment and loathing my gentle, simple hour. And she did not even struggle; she only cried.

And I looked at her tears, the tears of a slim, tired girl, tears that made her hideous, a maid of sorrow. And I took my hands from her, for I had touched her beauty and at my touch it became hurt and desolate and ugly. I took my hands from her, and I went away.

  • Sounds legit, assuming "plot" refers to the entire story, not some theatrical play the guy returning to the couch was working on. It predates Hubbard and Borges. Let's see if someone comes up with something earlier.
    – Martin
    Jan 27, 2020 at 7:08
  • Oops, I just noticed that you specified sci-fi, apparently excluding fantasy. The Unholy City does have some stfnal touches, e.g. the guy who is being kept alive forever, or the guy who was brought back to life after being frozen for years, and maybe the layya (a beast not known to real world zoology) and the high-speed vehicular traffic count. But overall I'd classify it as fantasy.
    – user14111
    Jan 27, 2020 at 8:19
  • Well, something clearly scifi would be best. Assuming the guy in the excerpt is referring to the book he's a character in, I would call this our leading contender.
    – Martin
    Jan 28, 2020 at 13:58
  • I've read the book several times, though not recently. As far as I know, there is nothing else the character could mean by "the plot" except the plot of the book he's in. However, I'm going to post an earlier example, hoping it meets your requirements.
    – user14111
    Jan 30, 2020 at 6:08

1916: "Enoch Soames" (subtitled "A Memory of the Eighteen-nineties"), a novelette by Max Beerbohm available e.g. at Project Gutenberg, is the story of an obscure poet, the titular Soames, unappreciated by his contemporaries, who sells his soul to the Devil for the privilege of spending an afternoon in a library (the reading-room of the British Museum) 100 years in the future, so that he can see how he is regarded by posterity.

Is it science fiction? Pact-with-the-Devil stories are generally classified as fantasy. On the other hand, this is also a time-travel story, and time travel has been a standard science-fictional theme since Wells's The Time Machine, which is alluded to in this story. In the following excerpt the Devil has made his proposal to Soames in the company of his friend Max Beerbohm, the author and first-person narrator:

'All right,' said Soames.

'Soames!' I entreated. But my friend moved not a muscle.

The Devil had made as though to stretch forth his hand across the table and touch Soames' forearm; but he paused in his gesture.

'A hundred years hence, as now,' he smiled, 'no smoking allowed in the reading-room. You would better therefore—'

Soames removed the cigarette from his mouth and dropped it into his glass of Sauterne.

'Soames!' again I cried. 'Can't you'—but the Devil had now stretched forth his hand across the table. He brought it slowly down on—the table-cloth. Soames' chair was empty. His cigarette floated sodden in his wine-glass. There was no other trace of him.

For a few moments the Devil let his hand rest where it lay, gazing at me out of the corners of his eyes, vulgarly triumphant.

A shudder shook me. With an effort I controlled myself and rose from the chair. 'Very clever,' I said condescendingly. 'But—The Time Machine is a delightbul book, don't you think? So entirely original!'

'You are pleased to sneer,' said the Devil, who had also risen, 'but it is one thing to write about a not possible machine; it is a quite other thing to be a Supernatural Power.' All the same, I had scored.

Moreover, as a result of this time travel, part of the story is set in the future year of 1997. The people of the future present a stereotypically futuristic appearance, as described by Soames to Beerbohm after his return:

'That's right. Try to remember everything. Eat a little more bread. What did the reading-room look like?'

'Much as usual,' he at length muttered.

'Many people there?'

'Usual sort of number.'

'What did they look like?"

Soames tried to visualize them. 'They all,' he presently remembered, 'looked very like one another.'

My mind took a fearsome leap. 'All dressed in Jaeger?'

'Yes, I think so. Greyish-yellowish stuff.'

'A sort of uniform?' He nodded. 'With a number on it, perhaps?—a number on a large disc of metal sewn on to the left sleeve? DKF 78.910—that sort of thing?' It was even so. 'And all of them—men and women alike—looking very waell-cared-for? very Utopian? and smelling rather strongly of carbolic? and all of them quite hairless?' I was right every time. Soames was only not sure whether the men and women were hairless or shorn. 'I hadn't time to look at them very closely,' he explained.

Also, the future people have instituted socialism and spelling reform, as can be seen from the next excerpt; so it is a kind of utopia or dystopia.

Is it self-referential? Soames spends a long time in the library, looking for any sign that he is remembered at all. At last, he finds his name in the index of a book by one T. K. Nupton. To his dismay, it is not a reference to Soames himself, but to the work of that title by Beerbohm, which Nupton takes to be fiction, and Soames to be a fictional character invented by Beerbohm! Here is the passage Soames copied out:

From p. 234 of Inglish Littracher 1890–1900, bi T. K. Nupton, published by th Stait, 1992:

Fr. egzarmpl, a riter ov th time, naimd Max Beerbohm, hoo woz stil alive in th twentieth senchri, rote a stauri in wich e pautraid an immajnari karrakter kauld 'Enoch Soames'—a thurd-rait poit hoo beleevz imself a grate jeneus an maix a bargin with th Devvl in auder ter no wot posterriti thinx ov im! It iz a sumwot labud sattire but not without vallu az showing hou seriusli the yung men ov th aiteen-ninetiz took themselvz. Nou that the littreri profeshn has bin auganized az a department of publik servis, our riters hav found their levvl an hav lernt ter doo their duti without thort ov th morro. 'Th laibrer iz werthi ov hiz hire,' an that iz aul. Thank hevvn we hav no Enoch Soameses amung us to-dai!

A time paradox is narrowly avoided because of Nupton's indolence, as Beerbohm explains:

In that extract from Nupton's repulsive book there is one point which perhaps puzzles you. How is it that the author, though I have here mentioned him by name and have quoted the exact words he is going to write, is not going to grasp the obvious corollary that I have invented nothing? The answer can but be this: Nupton will not have read the later passages of this memoir. Such lack of thoroughness is a serious fault in any one who undertakes to do scholar's work. And I hope these words will meet the eye of some contemporary rival to Nupton and be the undoing of Nupton.


Maybe not the first, but it is true sci-fi: "The Last Disaster" by Hugh Walters, published in 1978. The story is that the Moon has been dislodged from its orbit and will shortly crash into the Earth. UNEXA (The United Nations EXploration Agency, the world-wide organisation in charge of space exploration) keeps the information secret but wants to know how the public will react to the news, so it commissions a sci-fi author called Wally Hughes (Hugh Walters' real name) to write a book about the Moon crashing into the Earth. Hugh Walters - The Last Disaster

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.