Rankin did not set out to be a crime writer. He thought his first novels Knots and Crosses and Hide and Seek were mainstream books, more in keeping with the Scottish traditions of Robert Louis Stevenson and even Muriel Spark (the subject of Rankin's uncompleted Ph.D. thesis), and was disconcerted by their classification as genre fiction. However, he was reassured by Scottish novelist Allan Massie, who tutored Rankin while Massie was writer-in-residence at Edinburgh University, with the following words; "who would want to be a dry academic writer when "they could be John Buchan?"
Rankin's Inspector Rebus novels are mainly set in Edinburgh, and are major contributions to the Tartan Noir genre. Ten of the novels were televised on ITV, starring John Hannah as Rebus in Series 1 & 2 with Ken Stott taking on the role for Series 3-5.