His interest in adventure stories was sparked by his father, who was his primary school teacher, telling his class tales about the Vikings and Egyptians.
"As an avid historian, he would sometimes spice things up to keep us interested," says Colfer, 46, who lives with his wife, Jacqueline, and two sons, Finn and Sean, in Wexford, in Ireland.
It is no surprise historical figures became characters in his early stories. "I'd always insert a young boy, who represented myself, to accompany them on their adventures," he says.
Artemis Fowl, the first book in the young-adult fantasy series, was published in 2001. Last year, the seventh, Artemis Fowl and The Atlantis Complex, won the children's category of the Independent Booksellers Book Prize in Britain.
The series follows the adventures of Artemis Fowl II, the son of a gangster; in the first book, he is 12. He slowly changes his ways and relationships as he grows up. Colfer chose to write about an unconventional teenage character. "I've always been attracted to the idea of the anti-hero," says Colfer, who is fond of fictional characters such as Huckleberry Finn and Bart Simpson. "I found [them] so much more interesting than straightforward heroes."
He created Artemis by combining his own mischievous little brother with the type of villain seen in the James Bond films. Initially Artemis was to be only the villain, but soon Colfer made him the "main guy".
He says: "I decided he would have to learn from his mistakes; my readers [need] to see that all actions have consequences - that even the greatest villain can change."
Yet it was never Colfer's intention to use his science fantasy novels to preach to children.
"My books contain elements of my own moral code, but I've no interest in transmitting an overt message," he says. "Nothing turns off kids faster than being hammered with a moral every time they read a book. Most are smart enough to make up their own minds."
He believes a great story does not rely on a set of rules, but rather a good storyteller. "The secret is to have an engaging narrator, whom the reader wants to hear more from. A lot can be forgiven if a [storyteller] holds a fascination for the reader."
He says it helps when writers have an emotional connection with their characters, as he has had while writing his new book. The eighth and last book in his series, Artemis Fowl and The Last Guardian, will be published in July.
"Currently I am very fond of a little dwarf in the next book, who works in a nuclear power station below ground; he's a funny guy."
Colfer also enjoys the discipline of being a writer - of spending five hours each day planning, editing and writing his stories.
"I cannot imagine not writing; I guess I'll have to stop someday when my senses fail, but until then you'll find me at my computer."
For teenagers hoping to become writers, he says: "Read every day and try to do a little bit of writing, even a sentence or two. If possible, keep a journal - that will be a goldmine of ideas when you get older."
In March, Colfer will be in Hong Kong for the first Hong
Kong International Young Readers Festival, as part of the annual Hong Kong International Literary Festival.
For more on Colfer and other authors who will visit, go to www.youngreadersfestival.org.hk