The winner will also tour Mary King’s Close and enjoy a champagne lunch on board the Royal Yacht Britannia.
The prize package for the winner and a plus one also includes return travel to Edinburgh, two nights’ accommodation at YOTEL, a champagne lunch on board the Royal Yacht Britannia and a tour and tasting at Holyrood Distillery.
Rankin, author of the Inspector Rebus novels and winner of several national and international awards, will use the tour to tell stories of writers inspired by the Scottish capital including Robert Louis Stevenson, Sir Walter Scott, Irvine Welsh Alexander McCall Smith and JK Rowling.
The “author’s eye-view” tour will include visits to some of Edinburgh’s literary landmarks, including the Scott Monument in Princes Street which is dedicated to Edinburgh-born author Sir Walter.
Rankin said: “Like all the great novels, Edinburgh has a captivating story to tell that’s packed with intriguing characters, fascinating locations and many twists and turns along the way.
“It’s hard not to be inspired by a city that has such natural and architectural beauty, rich history and diverse character.”
After the tour, the winner and their plus one will join Rankin for a drink in the Oxford Bar, which is a familiar spot to Inspector Rebus fans.
They will also experience a tour of Edinburgh’s 17th century Mary King’s Close and dinner at Fazenda restaurant.
The City of Edinburgh Council leader Adam McVey said: “Edinburgh was Unesco’s first City of Literature and it’s not surprising the capital has provided the inspiration to so many writers and been home to such a diverse range of authors.”
He said he hopes the competition, which has been launched through travel group Forever Edinburgh’s The Story Never Ends campaign, will inspire residents and visitors to venture to the capital.
The council’s deputy leader Cammy Day added: “Edinburgh has something for everyone at all times of the year, and it’s a major attraction for book lovers.
“Whether you’re a Harry Potter fan or love Inspector Rebus, Edinburgh offers a wealth of literary connections spanning eras, genres and tastes.”
The competition can be entered by anyone over the age of 18 who lives in the UK and can be accessed at http://edinburgh.org/ian-rankin.