The novel, called Standing in Another Man's Grave, is inspired by a song by the late Scottish singer and songwriter Jackie Leven and is dedicated to his memory.
Leven, who died last year aged 61, had collaborated with the author, on Jackie Leven Said, a mix of his music and a Rankin short story, which the pair performed at Edinburgh's Usher Hall in 2005 and later released on a CD.
Leven, from Kirkcaldy in Fife, wrote a song called Standing in Another Man's Rain.
Yesterday, at the Hay Festival in Wales, Rankin said there was "unfinished business" with Inspector John Rebus and the latest story was the "perfect fit" for him.
The detective was last seen in Exit Music, published in 2007 – the 17th Rebus novel – which also featured his retirement.
Since then Rankin has written two novels with a new main character, Malcolm Fox, who works in the internal investigations unit of Lothian and Borders Police.
Since Rebus's first appearance in 1987, the novels featuring the Edinburgh detective have been translated into 22 languages, becoming international best-sellers.
Rankin said: "I felt there was unfinished business between the two of us. He had never really gone away but was working for Edinburgh's cold case unit.
"And I knew I had a story that was a perfect fit for him."
The novel, out in November, will see Rebus finding himself in trouble with Fox.
His former partner, Detective Sergeant Siobhan Clarke, will also feature, advancing in her own career.
It is not yet known whether this will be the final appearance of Rebus in Rankin's work.
Leven died after a battle with cancer in November last year, but the final years of an often troubled life were marked by immense musical productivity, beginning with his acclaimed 1994 album, The Mystery of Love Is Greater Than The Mystery of Death. He sometimes recorded under the name of Sir Vincent Lone.
Edinburgh-based Rankin added: "Jackie was a great guitarist and a fine songwriter with a vein of robust romantic imagery and a voice that could melt granite.
"He was also a terrific storyteller whose life had provided no end of material.
"He's still much missed by all of us who knew him."
Rankin in fact predicted at the Edinburgh International Book Festival in 2009 that Rebus may return in the third Fox novel. He said then: "Whatever I say about Rebus will make the news, but I think of him only being one corridor away from Fox, probably working on cold cases.
"Maybe in book three, Fox could investigate Rebus – that would be interesting."
Rankin has written novels not featuring Rebus before, including his books under the pseudonym of Jack Harvey and also his crime novel set around the National Galleries of Scotland, Doors Open, which is currently being made into a movie starring Stephen Fry.
The author's most recent novel is The Impossible Dead, the second book featuring Fox as its main character.
Rebus has been portrayed on television by both John Hannah and Ken Stott.