Whether they were written by Scots or by authors who were simply inspired by our past literary greats and stunning scenery, Scotland is to thank for some of the greatest literary works in history.

Scotland's literary pedigree can be traced back centuries, with examples of writing still existing today that can be traced back as far as the 6th century. As far back as the middle ages, we've provided the world with some of its greatest authors, who have inspired countless other around the world and - at times - even whole literary movements with the skill in which they put pen to paper. Yes - whether you prefer  old school greats like Robert Burns, Sir Walter Scott, Robert Louis Stevenson and Arthur Conan Doyle, or modern classics like Irvine Welsh, Ian Rankin, Iain Banks and Val McDiarmid, us Scots really do have a way with words.

It comes as no surprise then, that in 2004, Scotland's capital city - Edinburgh - was recognised by UNESCO for its distinguished service to literature and became the world's first ever UNESCO City of Literature. 

View of Edinburgh from Calton Hill

The city has inspired more than 500 novels, ranging from Robert Louis Stevenson's Dr Jekyll and Mr Hyde to Irvine Welsh's Trainspotting. Parts of other classics like Mary Shelley's Frankenstein and Charles Dickens' The Pickwick Papers are also set there - with Dickens having strong Edinburgh connections. Kenneth Graham, author of The Wind in the Willows and Arthur Conan Doyle - of Sherlock Holmes fame - were also born in the capital. Whereas Compton Mackenzie and Thomas de Quincey spent their last years there despite having no prior connection with the city.

Percy Bysshe Shelley came to Edinburgh to be married and William Hazlitt came to be divorced. John Buchan worked for the Edinburgh publishers Thomas Nelson while Walter Scott was for many years an Edinburgh lawyer. R.M. Ballantyne, who wrote the children's classic Coral Island, was at Edinburgh Academy just before R.L. Stevenson. Rebecca West was educated at George Watson's Ladies College while Ian Fleming's character James Bond was sent to the public school Fettes after an indiscretion with a ladies maid at Eton.

'St Trinians', immortalised in Ronald Searle's cartoons, was based on an Edinburgh school of the same name while, perhaps, the best known Edinburgh novel The Prime of Miss Jean Brodie, was inspired by Muriel Spark's time at James Gillespie's School for Girls. Wilfred Owen and Siegfried Sassoon were sent to convalesce in Edinburgh during the First World War (the inspiration for Pat Barker's novel Regeneration) where they were visited by Robert Graves.

The Elephant House...birthplace of JK Rowling's Harry Potter series

Other literary visitors to Edinburgh have included W.H. Auden, John Betjeman, Robert Burns, Daniel Defoe, George Eliot, Washington Irving, Henry James, Tobias Smollett, William Thackeray, Oscar Wilde, Evelyn Waugh and William Wordsworth.

Two writers associated with the city, perhaps surprisingly, are Hans Christian Andersen and Jules Verne. Hans Christian Andersen (1805-1875) visited the city in 1847 where he was entertained widely by, amongst others, James Simpson who discovered chloroform. A plaque marks his stay at 73 East Trinity Road. Verne (1828-1905) is best remembered for Journey to the Centre of the Earth, 20,000 Leagues under the Sea and Around the World in 80 Days but he knew Edinburgh well and both Backwards to Britain and The Underground City have numerous Edinburgh scenes.

That sense of the literary past is always present as the city has changed comparatively little during the last two hundred years. The buildings lived in or frequented by writers are therefore still very much as they were.

Many visitors' first experience of the city is when they arrive by rail at Waverley Station (named after Sir Walter Scott's novel) and emerge onto Princes Street. Ahead of them is the Scott Monument and in the distance lies the emotive Edinburgh Castle. The city hosts the world's largest International Book Festival each August and offers several literary walking and bus tours.

Find out more about Edinburgh's literary connections:

Edinburgh UNESCO City of Literature

Edinburgh International Book Festival

The Writer's Museum, Edinburgh

VisitScotland: Edinburgh's literary history

Related content