One of the Waverley Novels by Walter Scott, The Black Dwarf was part of his Tales of My Landlord, 1st series (1816). It is set in 1708, in the Scottish Borders, against the background of the first uprising to be attempted by the Jacobites after the Act of Union.
On 30 April 1816 Scott signed a contract with William Blackwood for a four-volume work of fiction, and on 22 August James Ballantyne, Scott's printer and partner, indicated to Blackwood that it was to be entitled Tales of My Landlord which was planned to consist of four tales relating to four regions of Scotland. In the event the second tale, Old Mortality, expanded to take up the final three volumes, leaving The Black Dwarf as the only story to appear exactly as intended. It is not clear precisely when Scott began composition, but the tale was complete before the end of August.
For the historical background Scott was particularly indebted to two books: Memoirs Concerning the Affairs of Scotland by George Lockhart of Carnwath (1714), and The History of the Late Rebellion by Robert Patten (1717). He also drew extensively on the ballads he had edited in Minstrelsy of the Scottish Border (1802-03).
The story is set just after the Union of Scotland and England (1707), in the Liddesdale hills of the Scottish Borders, familiar to Scott from his work collecting ballads for Minstrelsy of the Scottish Border. The main character is based on David Ritchie, whom Scott met in the autumn of 1797. In the tale, the dwarf is Sir Edward Mauley, a hermit regarded by the locals as being in league with the Devil, who becomes embroiled in a complex tale of love, revenge, betrayal, Jacobite schemes and a threatened forced marriage. Scott began the novel well, "but tired of the ground I had trode so often before... I quarrelled with my story, & bungled up a conclusion."
The introduction to The Black Dwarf attributes the work to Jedediah Cleishbotham, whom Scott had invented as a fictional editor of the Landlord series. It is here that we have the most complete view of this character. (wikipedia.org)