Melmoth the Wanderer is a gothic novel published in 1820, written by Charles Robert Marturin (uncle of Jane Wilde who was mother of Oscar Wilde ).
The central character, John Melmoth ,is a scholar who sells his soul to the devil in exchange for 150 extra years of life and spends that time searching for someone who will take over the pact for him; the novel actually takes place in the present, but this backstory is revealed through several nested stories-within-a-story that work backwards through time (usually through the Gothic trope of old books).
The novel was cited by Karl Edward Wagner as one of the thirteen best supernatural horror novels, and by H.P. Lovecraft as "an enormous stride in the evolution of the horror-tale".
Oscar Wild , during his travels after release from prison, called himself Sebastian Melmoth, deriving this pseudonym from the title character in his great-uncle's novel and from Saint Sebastian .