And that’s not all, as the prize package for the lucky winner and a plus one also includes a two-night stay at Yotel in the New Town, a champagne lunch on board the Royal Yacht Britannia and a tour and tasting at Holyrood Distillery.
Edinburgh-based Rankin will use the tour to tell stories of writers inspired by the Scottish capital – including Sir Walter Scott, Robert Louis Stevenson, Irvine Welsh, Alexander McCall Smith and JK Rowling.
The ‘author’s eye-view’ tour will include visits to some of Edinburgh’s literary landmarks, such as 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, a favourite haunt of both the author himself and his most famous creation, the hard-drinking Inspector John Rebus.
They will also experience a tour of Edinburgh’s 17th century Mary King’s Close and dinner at Fazenda restaurant.
Adam McVey, the City of Edinburgh Council leader, 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 – 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 via https://edinburgh.org/competition/.
Meanwhile, Rankin has said he's written a lot more than he normally would due to lockdown – so 2022 is shaping up to be a busy year for the Capital writer.
He has written a Rebus stage play about a murder at an Edinburgh dinner party which is now with a producer and will hopefully be seen on stages around the UK next year.
And his thoughts are turning to his next book, which is likely to see the return of DI Rebus.
He said: “I think it’s going to be a Rebus book. There’s a little bit of unfinished business at the end of A Song for the Dark Times and I want to clear that up.
“People keep asking me 'what happens at the end, you left it very open?’ Just for my own peace of mind I want to clear that up, which means writing another book.”