It says a lot about Carl Djerassi that his first venture into literature was as an act of revenge. It was 1983; he was 60, an eminent professor of chemistry at Stanford University, famous for his successful synthesis, in 1951, of norethindrone, the first oral contraceptive. And he was in love with the woman who would become his third wife – Diane Middlebrook, the biographer, poet, and fellow Stanford professor. But, after several years together, she had fallen in love with someone else.

When he found out, Djerassi was distraught. "Like any man, I thought, 'Who is this other person?'" he says now. "It turned out that he was a professor of literature. So I decided, 'Well, I'm going to show her.' And I started writing."

Perhaps unsurprisingly, for a man whose intelligence and determination had already taken him from Nazi-era Vienna (he left his native Austria at the age of 14) to the highest reaches of the American scientific community, Djerassi's endeavours were successful. A year later, after showing Middlebrook his first novel, Djerassi won back her heart. He had also discovered a prodigious appetite for writing: today, if his literary output can't quite rival his 1,200 published scientific articles, it's undeniably impressive – five novels, two memoirs, several collections of essays and short stories, and nine plays.

I've met Djerassi in the unlikely setting of a church hall on a south London council estate to talk about his latest play, Insufficiency: rehearsals have just got under way here for its premiere at London's Riverside Studios later this month. Like many of Djerassi's other literary works, the play is a comedy, with chemistry firmly at its heart. Set on the campus of a second-rate American university, it's about the disastrous fall-out of an experiment by Jerzy Krzyz, an academic scientist specialising in "bubbleology" (the science of bubbles), on a bottle of champagne.

With his first play, 1998's An Immaculate Misconception, Djerassi came up with the concept of "science-in-theatre". In his precise, faintly accented English, he neatly explains the term to me now. "What I'm trying to do is not talk directly about science," he says. "That's too difficult to do, especially with chemistry. Rather than words, we chemists use the cryptography of structural formulas, which people [outside that world] don't understand. What I want to do with the theatre is to talk about the culture and behaviour of science – to show that scientists are not just Frankensteins or Strangeloves or idiot savants or nerds."

Above all, he's interested in describing what he calls the "tribal behaviour" of scientists – and he's critical of the scientific community for being reluctant to explain that behaviour to the outside world. "I'm a member of that tribe," he says, "and it's a tribe that does not advertise its behaviour – not because they want to keep it secret, but because they're not interested in discussing it. We're not, as a whole, introspective, because we're so focused on what we're doing. But it means that people outside science have a very limited idea about who we really are, and how we think."

People tend to have a limited idea of who Djerassi is, too: he's frustrated by the fact that he's still known to most only as the man who invented the pill. "It's as if I did that," he says crisply, "and then sat around twiddling my thumbs for the next 50 years."

When I ask if it was difficult for him to return to other lines of scientific inquiry after making such a major breakthrough, he eyes me with barely disguised irritation. "I was 28 when I made that discovery," he says. "I carried on working and publishing for 40 years. Among my peers, I am actually better known for my work in other areas." Aside from his early work on norethindrone, Djerassi has published widely on other medicines, including antihistamines and antibiotics; on the application of physical measurements; on artificial intelligence and its use in chemistry; and on developing new approaches to insect control.

He's reluctant to draw many parallels between the disciplines of science and theatre. "I think you would like me to say that I see many similarities between them," he says, "but in truth, I do not. They are totally different. With science – or, I must say, with chemistry, because that is the science I know – you must show your research to be absolutely accurate and correct. That is not the case with literature. But, when it comes to intellectual rigour, they need not be so far apart. I approach every play with the same emphasis on meticulous research that I have always used in my work as a chemist."

One of the reasons Djerassi was drawn to the theatre, he says, was to escape the punishing process of peer review that is part of any academic scientist's working life. "We scientists don't spend enough time thinking about an audience other than our peers," he says. "They can make or break our reputation, and often anonymously."

Can theatre critics not be just as savage? Djerassi smiles. "They can be. But at least they are in a separate profession: most of them are not also playwrights themselves." And perhaps, if a critic does turn an acid tongue on Insufficiency, we will soon see this chemist, writer and polymath take up theatre criticism – purely, of course, as an act of revenge.