The creator of Inspector Rebus came top in a survey carried out to mark the final week for children to enter the National Young Writers' Award.
Robert Louis Stevenson was in second place followed by Arthur Conan Doyle. In fourth place was Iain Banks while Robert Burns came fifth.
The research also found that Scotland was the most literary country in the UK, with 55% of people north of the border reading every day for pleasure.
This compares to 51% in England, 40% in Northern Ireland and 39% in Wales.
Lise McCaffery, curriculum development manager at Explore Learning in Scotland, said: "We are thrilled to discover that we are a nation of readers but it's important to encourage our children to realise the rewards of writing too.
"The novels of Ian Rankin and the classics of Robert Louis Stevenson and Arthur Conan Doyle are testament to the rich culture and history that we have as a nation.
"The aim of the National Young Writers' Award is to encourage children to have a go at writing their own stories, inspire their imaginations and help them to really value the joy that it can bring."
The study, by tuition provider Explore Learning, also found that more than eight in ten (83%) Scots believe that children's appreciation of Scottish literature is at an all-time low and that they spend far too much time playing games and watching TV.
The National Young Writers' Award, judged by author Liz Pichon, is aimed at children aged five to 14 and challenges them to write a 500-word story on the theme "fairy tales and fables".
The winning author will be awarded a trip to Disneyland Paris for their family and £500 worth of books for their school.
Children can enter by filling in an entry form via their local Explore Learning centre or online at www.explorelearning.co.uk/youngwriters. The closing date is Tuesday June 3.
The survey of 2,000 people (307 of them in Scotland) was carried out in May.