New York City, 1953. While spraying an apartment for insects, Bill Lee runs out of bug powder, to the annoyance of his employer, A.J. Cohen, who rations it carefully. In a local bar, Bill meets with two writer friends who debate technique. Martin endlessly rewrites while Hank disagrees with any form of self-censorship. Bill's opinion is "exterminate all rational thought". Bill tells them that he no longer writes because it's "too dangerous". Bill arrives home to find his wife, Joan, shooting up the powder. She tells him that he should try it too by saying: "it's a Kafka high... you fee like a bug."
Bill is arrested for possession of illegal drugs, and at the police station narcs Hauser and O'Brien leave him a interrogation room with a giant beetle. Gorging itself on the powder, it asks him to rub it into it's sphincter-like "lips" on its back, and says it's his "case officer". Bill's assignment is to kill his wife, who is an inhuman agent for Interzone Incorporated. Bill crushes it with his shoe and escapes from the station. Bill finds Joan and tells her that he was arrested for bug powder and he's hallucinating. A work colleague gives him a card for Dr. Benway, who can cure his addition.
At Dr. Benaway's office, the mysterious doctor dispenses black centipede powder, which he says is like "an agent who's come to believe his own cover story but who's in there, in a larval state, just waiting for the proper moment to hatch out". Passing a marker stall selling giant centipedes, Bill feels nauseous. When he gets home, Hank is having sex with Joan while Martin recites stream of consciousness prose. He inject himself and Joan with narcotics and then says "I guess it's about time for our William Tell routine." She places a glass on her head and he shoots, killing her.
In a bar, a young Asian man introduces Bill to a mugwump, a bizarre gangly alien creature who recommends a Clark-Nova portable typewriter for his report on his wife's death, to be written in Interzone. It hands him a ticket. In a pawnshop, Bill exchanges his gun for a Clark-Nova.
In Interzone, a North African coastal enclave, Bill and many other men type reports. He is propositioned by German bon vivant Hans, whose drug factory synthesis black centipede 'meat'. In Bill's room, his drug haze is interrupted by his Clark-Nova's semi-transformation into a beetle - a bug writer - which tells him that homosexuality is an agent's best cover.
At a party, Bill meets expiate American writers Tom and Joan Frost. Joan looks like Bill's death wife, and whom has the same name. Tom confesses to Bill that he is killing her slowly, using their housekeeper Fadela. He does this telepathically - her lips says something else entirely. Bill crashes out on Interzone beach, and in the morning he is picked up by enigmatic Swiss dandy Cloquet. The Frosts tell Bill that he impressed Cloquet, and Tom lends him his sleek Martinelli typewriter. Bill writes that he seems addicted to something that doesn't really exist. He wakes up to find his bug writer devouring the Martinelli, which is indignantly informs him it is a enemy agent. It suggests that he seduce Joan Frost for information.
Bill goes to see Joan and confesses to wrecking Tom's Martinelli. She tells him that she has another, in Arabic - a Mujahedin (!) As she types something erotic, it mutates into organic form. A vaginal orifice opens, into which she thrusts her fingers as Bill caresses her. Their arousal escalates and the typewriter transforms into a 'sex blob' and jumps on them in uncontrolled ecstasy. They are interrupted by housekeeper/witch Fadela, who whips the thing over the balcony. It crashes to the street in front of an incensed Tom, becoming a typewriter once more. Bill and Joan walk through the kasbahs, finding Fadela with her cover on a stall selling black centipede meat. Joan is her power.
The bug writer tells Bill that he was programmed to kill his wife. She was a "special case", an elite-corps-centipede. Tom storm in for his Martinelli, only to find it smashed, and captures the bug writer in exchange. On Interzone beach, Bill is found by Hank and Martin, who encourage him to complete his book 'Naked Lunch', which they have been receiving installments. He doesn't know what they're talking about. They get him on the bus back.
Bill passes out in an alley and is helped by Kiki, who takes the broken Martinelli to a forge where a new mugwump-head typewriter is cast. The 'mugwriter' tells Bill that Benway is behind Interzone Inc. His powder is based on the black centipede meat; however, he's too elusive to catch. Bill and Kiki takes a ride in Cloquet's "wonderful car", and Bill relates a story about a man who taught his asshole to talk, but found it aspired to a life of its own.
At his sumptuous house, Cloquet takes Kiki into the bedroom. When Bill investigates, Cloquets has become a giant centipede, literally sucking Kiki dry inside a huge cage. Bill takes the mugwriter to Frost to swap for his Clark-Nova. It has been tortured, but before expiring, it tells Bill to go to Hans' drug factory in the medina, where he'll find Interzone Inc.
The factory is now a dispensary, where mugwumps are strung up and highly addictive jissom is milked from teat-like protrusions on their heads. Fadela supervises the process, while Hans and other dissipated addicts consume the jissom. Fadela reveals herself to be Benway in a prosthetic disguise. Bill agrees to work for Benway in Annexia, as long as Joan can accompany him.
Bill drives a strange red half-truck vehicle to the border, where the border guards demand proof that he is a writer. Bill wakes Joan and says it's time for the William Tell routine. She places a glass on her head, and once again he shoots her. He is devastated, but the guards merely welcome him to Annexia and wave him on.