Andrew Strong's first novel, Oswald and the End of the World, hit major bookshelves and online retailers in August.
The head of Llanbister Primary, a small rural school in Powys, told how he had sent an outline of the story idea to just two publishers in a "last-ditch attempt" to break into the literary world after 20 years of rejections. But he is not planning to give up his day job just yet despite a "small" five-figure advance on his next book, set to be published next year.
"I'm quite proud and pleased that the book has done so well," he said. "I just want to keep writing but it's a long process.
"In teaching everything happens at light speed. Getting a reaction from a publisher and feedback is incredibly slow."
Aimed at Year 5 and 6 pupils, the book tells the tale of 12-year-old Oswald who lives on a pseudo-Victorian island with a dad who thinks he is a great fortune-teller but is actually a figure of fun.
It has been short-listed for the Stockton children's book of the year award. And Mr Strong claims much of his inspiration came from his experiences at Llanbister Primary. He was asked to write it in the run up to an inspection in March last year after impressing publishers Scholastic Children's Books.
"I was frantic because of the inspection but determined to do well in both. I was totally wiped out afterwards - it took about a year to recover," said Andrew.
Inspectors gave the school a glowing report, saying it was "very effective and innovative". It also said the head made "an outstanding contribution to the life and teaching of the school".
But despite his success in teaching, Andrew still had a burning desire to see his work in print. "I'd been trying to get published for 20 years. Every few years I'd build up a head of steam. This was a last attempt really because my children are coming up to secondary school age and the amount of time I had was limited."
Instead of sending an outline of his novel to 10 or 20 literary agents, he sent just two - hitting the jackpot. "I think I've found my voice and a style of my own," said Andrew.
"I'd definitely been trying to find reading material for the age group I teach in Year 5 and 6. I find a lot of books are marketed towards niche groups. And the chapters are too long - my book has short chapters and lots of them," added Andrew.
Scholastic Children's Books is offering free copies of Oswald and the End of the World to the first 10 readers who email email@example.com with a story idea for TES Cymru.