In an isolated prison cell, an ageing, mustachioed gentleman sits writing at a small canteen table. Recent months have seen a stark change in his fortunes. Gone are the Gucci suits and the French hair dye. Gone is the entourage of supporters. He has no idea if the novel he is working on, an epic allegorical tale of passion and revenge, will ever be published.

Provisionally entitled The Great Awakening, his fifth novel will emerge into a very different critical climate from that which greeted the others. In his home country, his works were acclaimed, with sales said to run into millions. One was made into a 20-part TV series. It had been announced that his books were to become part of the national curriculum. And then the regime changed.

For eight years, Saddam Hussein has been carving out an alternative career as a writer of romantic and fantasy fiction, full of thinly veiled political allegory, grandiose rhetoric and autobiography. He has published four novels in less than five years - prolific for someone whose day job was, presumably, fairly demanding.

Many statesmen and revolutionaries have been consummate writers of prose and poetry. Saddam, however, is part of a less honourable tradition of despots who have turned their attentions to the arts. From Nero to Napoleon, Hitler to Mao, there is sufficient output to suggest that we acknowledge this as a genre in its own right: dictator literature.

As with any genre, the range of dic-lit talent runs from the literary to the populist. Fellow Middle Eastern autocrat and dic-lit star Colonel Muammar Gadafy has built a literary reputation based on a 1998 collection of short-story fiction entitled The Village, the Village, the Earth, the Earth and the Suicide of the Astronaut. An international edition, retitled Escape to Hell and Other Stories, included a foreword from Pierre Salinger, one of JFK's press spokesmen, who said the writings provided an insight into a unique mind.

Saddam's writing is at the other end of the dic-lit spectrum, following a populist family tradition. His uncle, a former mayor of Baghdad and an influential local tyrant himself, contributed to the genre with a book entitled He Created Them By Mistake: The Persians, Jews and Flies, published in 1974. His masterstroke was to make 20,000 Iraqi schools purchase 50 copies each. Result: a million-seller, and no marketing spend at all.

What motivates dic-lit authors? They know critical reaction to their work is unlikely to be genuine. It may be that the act of creating "art" is an extension of the urge to control. Fiction in particular offers the author a malleable world. But just because he was a brutal dictator, should Saddam be excluded from a place in literary history? Many great writers were not great human beings - perhaps Saddam merely had more scope to realise his vision.

Of Saddam's four novels - Zabibah and the King, The Fortified Castle, Men and the City and Be Gone, Demons! - the first remains the best known and best-selling. Published in 2000, it is a torrid, romantic tale with an obvious political analogy. Zabibah, the heroine, represents Iraq; her cruel husband is America; and the strong but vengeful king is Saddam. "Once upon a time," the fairytale-like story opens, "there was a great and powerful king ... His influence was widespread ... He was surrounded by respect, peace, love, and trust as well as awe and fear ... This king was obeyed by his people, either willingly or by force."

Zabibah, unhappily married, falls in love with the king and they develop an intimate friendship. " 'Do the people need strict measures from their king?' he asks. 'Yes, your majesty,' she replies. 'The people need strict measures so that they can feel protected.' " Such exchanges may be understood as Saddam exploring his personal demons. The king always has the last word as their discussions range over themes of power, cruelty, justice, nature and tradition.

Then, one night, Zabibah is attacked and raped by a hooded stranger. The stranger turns out to be her husband (the Americans!) and so the incident offers the king an opportunity to take vengeance. A great battle follows, coinciding with the 1991 Desert Storm assault of the Kuwait war. But in this case, US forces are symbolically defeated, as the vicious husband is killed. Order is restored, though, tragically, neither Zabibah nor the king lives to see it.

On the back of this tour de force came The Fortified Castle which, like Zabibah, also veils a political agenda with romance. Set after the 1991 war, it tells the story of an ex-soldier who falls for a girl from northern Iraq (balm to Saddam's actual policies against the Kurds). The subplot - a servant running off with the master's sister - is a clear reference to Saddam's feelings of betrayal by the Kuwaitis.

The third, a biographical novel, Men and the City, is based on the rise of the Ba'ath party. It features a tableau of relatives, including Saddam's uncle and grandfather. But it is in the fourth novel that Saddam focuses on his favourite genre: military literature. Be Gone, Demons! follows an Arab nobleman, Salim, in his battle to defeat his American and Jewish enemies (both recast as ancient-style foreign tribes) in a mission that mirrors the attack on the World Trade Centre in New York in 2001.

By this point in Saddam's literary career, US and Jewish hegemony has become an obsession. With the book completed in the run-up to the 2003 war (no wonder Iraqi forces had no strategy), the presidential publisher Al-Hurriah (meaning "freedom") managed to print just 40,000 copies of Be Gone, Demons! before the fall of Baghdad to US forces. As with all his books, Saddam's name is absent from the cover. He prefers the phrase: "A novel written by its author."

It is easy to see why the CIA, MI6 and Mossad have analysed these outlandish tales in detail. Avi Rubin, an ex-Mossad agent, believes that Saddam's past is at the core of his anger against seemingly broader targets such as western civilisation and Jews. "In reality," Rubin argues, "he is speaking about the pain of his own childhood and upbringing."

Indeed, that childhood is as freakish as any of his fictions. Saddam's mother was a prostitute, he was gang-raped by homosexuals at the age of 10, and as a teenager was refused admission to Iraq's top military school. The inspiration for Zabibah was probably his fourth wife, Iman, 40 years his junior, whom he adored and married a few years ago, aged 63.

So dic-lit may be seen as a confessional genre. But what of the writing? Does Saddam have talent in the romantic fantasy genre? I sent extracts of Zabibah and the King "blind" to some experts. The editor at Mills and Boon, after agreeing to comment, backed out when she discovered who the author was. But JoJo Moyes, winner of the Romantic Novelists' Association novel of the year award, agreed, and was alarmed by the style. With the first four paragraphs of the book containing no less than 13 rhetorical questions, she pointed out that the author was not interested in his readers. "I had a fear that it was by Osama bin Laden or Alastair Campbell," she said, trying to guess the author. "Once I knew who it was, it all made sense. His writing was the literary equivalent of those lurid fantasy murals he had painted all over his palaces."

Tina Phillips, a consultant researcher at the School of Oriental and African Studies in London, is surprised that Saddam chose the novel at all, as in wider Islamic culture it is the poet who is most revered. And in Iraq, fiction was all but banned by Saddam. Perhaps, in any case, he was not the real author of the works. There are rumours that a ghostwriter was poisoned to keep the truth secret. But even if Saddam did not write every word then, he is certainly writing them all now.

The obvious conclusion from the work is that we are looking at an author who is insecure, untalented and delusional. Is he alone among dic-lit authors? Clearly not.

But Colonel Gadafy, by comparison, is an authentic voice who has carved out a new narrative form derived from traditional popular culture. His writing has shades of Russian literature interestingly transposed on to an environment of modern urban decay and psychological pollution. "By the nature of city life, one's purpose becomes self-interest and opportunism. And one's norm of behaviour becomes hypocrisy," Gaddafi has written with, if not great originality, then at least some perceptiveness.

Saddam's writing seems more a consolation for his political failings. He knew that his career as an overlord was on the wane after the 1991 Gulf war, and it is no coincidence that this is when his literary endeavours began. His translator, Sa'adoon al-Zubaydi, maintains that, fuelled by the good notices for Zabibah, he began to retreat into his own internal world. He increasingly came to use body doubles rather than meeting his armed forces face to face.

The Iraqi poet Nabeel Yasin argues that the mixture of fact and fiction in his books is there to create an emotional and political utopia (like fellow jailbird and fantasist Jeffrey Archer, Saddam bases his novels on the reinvention of the facts of his own life). And according to Zubaydi, Saddam "longed for a return to some original state of purity". As one literary Jordanian put it: "He writes about the world as he would like it to be. The lost Kurdish girl can fall in love with the disbanded Iraqi soldier, and the king can rule on in peace, loved and respected by his people."

For now, we can only speculate about whether his inner life will sustain the former Iraqi leader, like Archer or Oscar Wilde, through his incarceration and trial. Knowing Saddam's writing, however, he won't be giving us The Ballad of Abu Ghraib.

· This is an edited version of an article which appears in this month's edition of Prospect magazine.