The Great God Pan
What is now the first chapter of the novella was published in 1890 in a magazine called "The Whirlwind", while what is now the third chapter of the book was published in the same magazine the following year as a standalone short story called "The City of Resurrections". Machen only viewed the two works as connected after they were finished. Once he decided the two stories were connected, Machen wrote the rest of "The Great God Pan" in a single evening save for its final chapter. Machen did not think of an ending for the tale for months, and in that time believed that the novella would remain unfinished forever. The last chapter was completed in June 1891. Machen sent the novella to the publisher Blackwood, who rejected it, deeming it a clever story that "shrink[s]...from the central idea." It was accepted by John Lane and published in 1894. When published as a book, "The Great God Pan" was accompanied by another Machen tale called "The Inmost Light" which also features a mad scientist and elements of science fiction. The book's cover was illustrated by Aubrey Beardsley.
The Great God Pan
This story had particular resonance with Victorian literary audiences. In 1844, Elizabeth Barrett Browning wrote her poem "The Dead Pan", an adaption of Plutarch's story which insisted that proper Christian literature should abandon Greek mythology, with each stanza ending in the words "Pan, Pan is dead." As a member of the Decadent movement, Machen sought to subvert traditional themes and transgress literary boundaries, an agenda which made Pan a particularly appealing figure. The title of "The Great God Pan" appears to have been specifically derived from the Browning's later poem "A Musical Instrument" (1862), in which the first line of every stanza ends with the words "the great god Pan". Machen's use of Pan in the novella may have also been influenced by Robert Louis Stevenson's essay "" (1878) and Algernon Charles Swinburne's poem "" (1894), in which Pan is portrayed as the "emblem of the delicious combination of ecstasy and terror."