The Unforgotten Coat by Frank Cottrell Boyce has been named the winner of the 2012 Guardian Children's Fiction Prize.
The "inventive and magical" story is about two Mongolian refugee brothers living in Liverpool.
Former winners include Ted Hughes, Jacqueline Wilson and Andy Mulligan, who won last year for his book Return to Ribblestrop.
Cottrell Boyce, who also wrote the script for this year's Olympics Opening Ceremony, said it was "amazing" to win.
He said the award gave him a "particularly warm glow" because it was judged by fellow authors.
"Past winners include my childhood heroes - Alan Garner, Leon Garfield, Joan Aiken - and contemporary heroes like Mark Haddon, Geraldine McCaughrean and Meg Rosoff," said Cottrell Boyce.
This year's panel was made up of children's writers Tony Bradman, Cressida Cowell and Kevin Crossley-Holland and chaired by Guardian Children's books editor, Julia Eccleshare.
Eccleshare said the judges "unanimously" chose The Unforgotten Coat, as its "great immediacy and humour really set it apart".
The story examines the effects the immigration system has on children.
"With his brilliant depiction of two brothers from Mongolia trying to adapt to school in Liverpool while haunted by a fear from home, Frank Cottrell Boyce never preaches to the reader," Eccleshare said.
"Judges felt that he writes with such credibility and warmth that his readers will be left wiser when they have finished the story."
'Close to home'
Cottrell Boyce, who lives in Liverpool, said the book started life as a free gift to promote the charity The Reader Organisation.
Children's book publishers Walker gave away thousands of copies on buses, at ferry terminals and through schools, prisons and hospitals.
"It would be amazing to win this award with any book I'd written, but it is a special joy to win it with The Unforgotten Coat," the author said.
"The photographs in the book were created by my friends and neighbours - Carl Hunter and Claire Heaney. The story was based on a real incident in a school in Bootle.
"So everything about it comes from very close to home - even though it's a story about Xanadu!" he added.
Young readers also had their say on the longlisted books as winners of the Guardian's 2012 Young Critics competition or members of the newspaper's children's book site.
Charlotte, 9, who won the chance to review the book and said: "The characters are amazingly real and the book is full of surprises. I would recommend it to any reader who likes to find out about other children's lives."
Cottrell Boyce's first book, Millions, won the 2004 Carnegie Medal and was also shortlisted for the Guardian Children's Fiction Prize.
Earlier this year his sequel to the classic children's story of a flying car, Chitty Chitty Bang Bang Flies Again, was shortlisted for the 2012 Roald Dahl Funny Prize.
He is also a well-known screen and television writer and devised some of the Olympics Opening Ceremony's key moments along with director Danny Boyle, such as Mr Bean's solo performance.
The other books shortlisted for this year's Guardian Children's Fiction Prize were A Greyhound of a Girl by Roddy Doyle, Dead End in Norvelt by Jack Gantos and The Abominables by Eva Ibbotson.