The Edinburgh-based author said "big questions" were looming for people write about the police due to how forces and officers are now viewed around the world.
Rankin, who famously wrote to the police for advice on his first novel, suggested he was glad he had had the "slight luxury” about still being able to write about John Rebus because he is officially retired in the novels series.
Speaking on The Cultural Coven, a new podcast hosted by actress Nicola Roy, Rankin described Rebus as "a bit of an anarchist" who was likely to go after rich, wealthy, greedy and well-connected criminals.
Rankin also told how the title and storyline of the most recent Rebus book, A Song for the Dark Times, which was started before the pandemic, was partly inspired by how the world had become “a pretty dark place by 2019”, due to the rise of the far right across Europe and beyond, and the impact of Brexit in the UK.
Rankin said: “I do think that the crime novel at its best is political. Crime fiction involves exploring society from top to bottom.
“Rebus always struck me as a bit of an anarchist. If you’re rich, wealthy and well-connected, and you’re committing a crime because you’re greedy and you think you’ll get away with it, he’s much more likely to go after you than if you’re someone at the very bottom of society who is committing a crime because you’re desperate and have got nothing.
"He's much more likely to give someone like that a break. I guess that makes the books slightly political.
“Of course, there’s a bigger question brewing now for people who write about police officers.
"In the current state of the world, how can you write about a police officer and make them the goody, when we look around us and see that so often the police are not the goodies?
"They're not the knights in shining armour protecting all and sundry from whatever evil happens to be out there. So there’s big questions coming for people who write police procedurals.
“I’m part of that, except I’ve got the slight luxury in that Rebus is now retired. He’s no longer part of that world.
‘I don’t have to explore it quite as fully as people who are writing about cops.”
Published in October, A Song for the Dark Times sees Rebus head to the north of Scotland after a plea for help from his daughter Samantha, in a story which partly revolves around a Second World War internment camp.
Rankin said: “I started working on the book in September 2019, so it was pre-pandemic.
“I thought the world of 2019 was in a pretty dark place and could see resonances and parallels with the way the world was in the 1930s.
“I could see the rise of the far right in various countries and cultures in Europe and around the world.
“Brexit was turning us against our friends and one-time neighbours and telling us that we were different from them and better than them. That narrative of polarisation and us and them… I wanted to write about it.”