Ian Fleming and Anthony Burgess might seem an unlikely double act at first glance. It’s hard to imagine Fleming, the suave Old Etonian and veteran of British naval intelligence, having much time for Burgess’s defiantly northern, Catholic, working-class values. Had they met, Fleming may well have agreed with Burgess’s aristocratic pupils at the Malay College in Kuala Kangsar, the “Eton of the east” (where he taught in the 1950s), one of whom later said that Burgess was “not quite a gentleman”. Although Burgess and Fleming shared an agent – the amiable Peter Janson-Smith – there is no evidence to suggest that Fleming ever took the trouble to read A Clockwork Orange or any of Burgess’s other early novels.

Yet Burgess was fascinated by Fleming and in particular by the James Bond novels, which he read with close attention after Terence Young’s film version of Dr No was released in 1962. Burgess’s book collection, now at the International Anthony Burgess Foundation in Manchester, includes a complete run of the Bond novels and short stories, John Pearson’s The Life of Ian Fleming, Christopher Wood’s novelisations of the films and two copies of The James Bond Bedside Companion. Like his friend Kingsley Amis (who wrote the first post-Fleming Bond novel, Colonel Sun, under the pseudonym Robert Markham), Burgess was excited by the potential of the cold war espionage novel to reach a larger readership than his upmarket literary fictions were ever likely to attract.

Writing on the occasion of Bond’s 35th anniversary in 1988, Burgess celebrated the enduring figure of the international agent known for drinking vodka Martinis and “cold lovemaking with other men’s wives”. In his general introduction to the Coronet series of James Bond reprints, Burgess identified Bond as a hero figure who seemed to defy the austerity of post-1945 Britain.

There is an element of self-identification with Fleming on Burgess’s part, since both of them had come to the writing of popular novels in their middle years. Yet Burgess was aware of the growing distance between Fleming’s novels and the series of films that threatened to displace them in the popular imagination. “Bond,” he wrote, “is often compared facially to Hoagy Carmichael, the composer of ‘Stardust’, a song hit of the 1920s, but for very young readers the name ought to be glossed in a footnote. Bond belongs to history and these are historical novels.”

Burgess’s first attempt at a spy thriller came in 1966, with the publication of Tremor of Intent, a kind of parody of the James Bond novels, featuring a British spy whose enormous appetites for food and athletic sexual intercourse cancel each other out. Having spent time with his first wife in Leningrad and having used elements of Russian vocabulary to construct an invented slang for Alex and his “droogs” in A Clockwork Orange, Burgess was well placed to write about what he had seen in the Soviet Union during the Khrushchev and Brezhnev years.

It is clear from Tremor of Intent that Burgess did not share Fleming’s fathomless hatred of Soviet Russia. In From Russia, with Love, for example, Fleming presents his Soviet characters as deformed villains or sinister masturbators. Burgess’s Russians tend to be either inefficiently buffoonish or harmlessly drunk. This was a reflection of his own experience of visiting Russia for the first time in July 1961. He had expected to find an Orwellian dictatorship full of secret police. When a large fight broke out in the street outside the Metropol restaurant at 3am, no police arrived to break it up. “It is my honest opinion that there are no police in Lenin - grad,” Burgess noted shortly afterwards. When he wrote as much in the pages of the Listener, there was a complaint from the Soviet ambassador and he was officially denounced on Radio Moscow.

Tremor of Intent is also a critique of the excessive appetites to be found in Fleming’s books. One of the set pieces in Burgess’s parodic Bond novel is an eating competition between the British spy Hillier and Theodorescu, a sybaritic villain with a suspiciously perfect English accent. Burgess describes the endless courses with relish:

They got through their sweets sourly. Peach mousse with sirop framboise. Cream dessert ring Chantilly with zabaglione sauce. Poires Hélène with cold chocolate sauce. Cold Grand Marnier pudding, strawberry Marlow. Marrons panaché vicomte. “Look,” gasped Hillier, “this sort of thing isn’t my line at all . . . I think I shall be sick.”

Many critics did not notice that Burgess had written an allegory of the seven deadly sins. William Pritchard, who understood the point of Tremor of Intent, wrote in the Partisan Review: “It might be thought odd that a book whose subjects include gluttony satyriasis, covetousness, smacking self-regard and nagging self-disgust turns out to be not just human but humane.”

Determined to appeal to at least some of Fleming’s readers, Burgess told his editor at William Heinemann that he wanted a dust jacket suitable for the espionage genre. The art department duly produced an image of a spy in a white shirt and black tie, holding a gun and apparently being fellated by a naked woman. This provoked the outrage of the state censors in Malta, as Burgess discovered when he moved there and tried to import a copy.

In 1975, Burgess revived some of the characters from Tremor of Intent when he was commissioned by Albert R Broccoli to write a screenplay for The Spy Who Loved Me. Fleming’s original novel was considered unsuitable for adaptation but the title was retained with the aim of building a new story around it. Burgess’s script, which is now at the University of Texas at Austin, is an outrageous medley of sadism, hypnotism, acupuncture and international terrorism.

The plot concerns a private clinic in Switzerland, where small nuclear devices are secretly inserted into the bodies of wealthy patients while they are under anaesthetic, turning them into human bombs. An organisation called Chaos (Consortium for Hastening the Annihilation of Organised Society) plans to detonate one of these devices at the Sydney Opera House while the Queen is in the audience. Bond uses his newly acquired acupuncture skills to perform an emergency operation and defuse the bomb.

Having read Burgess’s script, Broccoli and his associates decided not to put it into production. They probably suspected (quite rightly) that Burgess was not taking the assignment entirely seriously. The only element from Burgess’s script that survived into the 1977 Roger Moore film was the villain’s underwater base. The script credit went to Christopher Wood and Richard Maibaum.

That may not be the end of the story, however. When Burgess was in the early stages of negotiating with Broccoli, they agreed that the book rights would remain with Burgess and that he would be free to publish a novelisation of his script. The opportunity is still there for another novelist, with the blessing of the Burgess estate, to write an espionage novel based on the materials that Burgess left behind. Perhaps Sebastian Faulks or William Boyd, who have both written Bond novels of their own, could be persuaded to take up the gauntlet?

“Tremor of Intent” is published in paperback by Serpent’s Tail (£8.99). Andrew Biswell is the director of the International Anthony Burgess Foundation