My favorite historical author is Robert Louis Stevenson. He published a number of great works during his lifetime including Treasure Island and Kidnapped, however my favorite story of his is The Strange Case of Dr Jekyll and Mr Hyde. The story was based, in part, on the real life story of Deacon Brodie, a local Edinburgh resident in the late 1700s. The story goes that Deacon Brodie was a local cabinet maker who would visit people's homes during the day to fix their locks, install cabinets, and do other security related chores, and at night, would return to those same homes and rob the residents. He allegedly used the money he pilfered to support his second life which included two mistresses, five children, and a pretty serious gambling habit. Deacon Brodie's story does not end well. He was hanged for his crimes at the Tollbooth on October 1, 1788. His story of an upstanding citizen by day and a criminal by night served as Stevenson's inspiration for the split personality of Dr. Jekyll and Mr. Hyde. Many of Stevenson's other stories were inspired by locals or took place in Edinburgh. Deacon Brodie serves as inspiration today for a tavern where his cabinetry store used to be. The food is great and the atmosphere can't be beat.
The most popular, current literary celebrity is JK Rowling, who wrote the Harry Potter books. JK Rowling started off her career writing most of the first few books a backroom overlooking Edinburgh Castle at The Elephant House coffee house. Alexander McCall-Smith and Ian Rankin have also visited the Elephant House so it is a great place to hang out and search for literary inspiration. The coffee at the Elephant House is pretty good too.
If you are a serious Literary nut, or enjoy a fun night out at a number of local pubs, I would strongly recommend a Literary Tour of Edinburgh. While current authors frequently have evenings out in their favorite place, such as Ian Rankin who has great nights out in Edinburgh, the Edinburgh Literary Tour visits all of the historic and current literary hot spots It's a pub tour as well so you're guaranteed to have a good time. I've taken the tour a number of times and always learn something new. The tour is great because it is never dull, which is why I still enjoy going, and it introduces my friends to the literary history of this city. The tour can also be done on your own time if you want to walk the tour during the day.
When you're visiting Edinburgh, try and spend at least a few hours learning about the great writers who have lived in this city and the stories inspired by the city. Edinburgh is a character in itself in many of these great stories. Edinburgh's rich literary history can be inspiring to everyone.