The National Library of Scotland today confirmed the best-selling novelist, who published his first Inspector Rebus book 32 years ago, had donated around 50 boxes of manuscripts and correspondence spanning five decades.
It has revealed that the treasure trove contains letters from novelists like Ruth Rendell and Jilly Cooper, as well as police officers who helped Rankin with his research on the Rebus novels, as well as leading political figures.
It will be hiring a dedicated curator to properly catalogue and promote the Rankin archive, which dates from 1972-2018, and is expected to be showcased in a future exhibition.
The archive, which now takes up more than 21 feet of shelving in the national collection, includes the original manuscript for the first Inspector Rebus novel, Knots and Crosses, which was partly written and set in the library's headquarters on George IV Bridge.
An extensive celebration of the late Dame Muriel Spark based on archives held by the National Library was recently staged there to coincide with the centenary of her birth in 1918.
The National Library previously staged a 20th anniversary celebration of the Inspector Rebus novels in 2007.
Rankin, who recently moved from the Merchiston area to the Quartermile development overlooking the Meadows, described the archive as “a pretty complete author’s life, late-20th century-style."
He said today: “I remember that in my first week as a postgraduate student we were given a tour of the National Library of Scotland, including access to the basement levels.
"Those vaulted underground corridors would reappear in the climactic scenes of my first Rebus novel.
"The National Library has seemed like a friend ever since, so it seems fitting – as well as a thrill and an honour – that my archive should find a permanent home there.”
National Librarian John Scally said: “Ian Rankin is a well-known face to us here at the National Library.
"We knew him when he was researching Muriel Spark as part of his PhD, and we knew him when he penned his first novels here in our very reading rooms.
"Little did we know then just how successful he was to become, and that in time, his archive would be as gratefully received as Spark’s. It will be preserved into perpetuity alongside other Scottish literary giants.
“Rankin’s main protagonist, John Rebus, has walked George IV Bridge many times, and frequently visited this very Library while researching cases.
"We are honoured to be a character in the Rebus novels alongside the city of Edinburgh, and we feel this is the rightful home for Ian’s archive. Because of his generosity, readers will be able to gain insight into the creative process of this wonderful writer.”