No good deed ever goes unpunished. And so, as Jules Feiffer told an overflow audience at the Katharine Cornell Theatre last Saturday night, after he wrote the screenplay for the 1971 film Carnal Knowledge, his Hollywood career stalled for a decade or more.

Mr. Feiffer knew he was in trouble even before the movie came out. He recalled a couple of the comments made by the Hollywood heavy-hitter directors after they had seen a preview screening.

“One said ‘uncompromising.’ And another said ‘like open heart surgery.’ I leaned over to Mike [Nichols, the director] and I whispered ‘We’re dead.’”

No doubt about it, the movie, a bleak look at sexual morality through the experiences of two emotionally-stunted male friends eternally preoccupied with their sex lives, was too frank and dark for many in 1971 America.

It encountered legal difficulties. A theatre owner in Georgia was convicted of distributing obscene material. The decision was eventually overturned, after two years, in the Supreme Court.

“I was in a sense blacklisted for 10 years. Nobody came near me. Hollywood hated the movie,” said Mr. Feiffer.

It was snubbed at the Oscars. Only one actor, Ann-Margret, got a nomination. Mr. Feiffer missed out, as did Mr. Nichols — then the hottest director in the country, after The Graduate and Catch 22 — Candice Bergen, Art Garfunkel, and a relatively new actor named Jack Nicholson.

Almost 40 years later, the idea that it might ever have been thought of as pornographic seems almost laughable. There’s a lot of strong language, and considerable exposure of Ann-Margret’s ample charms, but compared with what anyone can find on the Internet, Carnal Knowledge is today very tame stuff.

But it remains, as that director said, “uncompromising,” and maybe even more pertinent, considering those Internet portrayals of sexuality.

The way Mr. Feiffer told it on Saturday night, the movie was a amalgam of Hugh Hefner and Anton Chekhov.

At the time he wrote it, he’d been doing cartoons for Playboy. One morning, over breakfast a fellow Playboy cartoonist told Mr. Feiffer of emotional difficulties he had the previous night with his girlfriend, a Playboy bunny.

They had sex, then he went and had a shower, and when he came back, she was mad at him. They had sex again, he went for another shower, and she was mad at him again. The man could not understand why.

“I said, ‘Immediately after you had sex you had a shower . . .’” Mr. Feiffer said.

And the idea was there for a play.

As for the form of it, he admitted stealing the idea from Chekhov’s Three Sisters, in which there is a character named Vershinin, who initially comes across as very attractive.

“He talks about how times are bad now, but in 200, 300 years everything is going to be different. When you first hear him make that speech he is this romantic figure speaking idealism about the future and they fall in love with him and you in the audience fall in love with him.

“And then, as the play progresses and things get darker and darker and more and more bleak, he’s making the same speech, in a different context. It suddenly becomes a commentary, not on hope for the future but on his own emptiness and inability to see what’s really going on and his own delusional state,” he said.

And so Mr. Feiffer set up two male characters, who the audience first meets as virgin college roommates, and traced their sex lives over a long period.

“What I wanted to do in this was rip off Chekov for my own use — which I’ve done any number of times in my playwriting career — and show these guys when they’re young and they’re kidding around, and it’s sexist as hell but they’re funny. They’re attractive, charming.

“Then 10 or 15 years later they’re having the same conversation and they’re at the same spot, but it’s a little uneasy-making. And 20 years later, they still haven’t moved an inch. They’re still in the same place, they haven’t grown, they continue their adolescence. And by this time it is . . . awful.

“It’s that progress or lack of it that I wanted to document in the lives of young men of my time,” he said, “where their lives were consigned to a kind of permanent adolescence.”

So he wrote the play, sent it to Mike Nichols, who agreed at once to make it a movie. Then they began casting.

The director sent Mr. Feiffer to see a movie called Easy Rider, with instruction to watch a young Jack Nicholson.

“When I came back I said I didn’t like the movie and I think this guy Nicholson is all wrong for the part. I don’t get it. I don’t get him.

“And Mike said — this is a direct quote — ‘Trust me, he’s going to be our most important actor since Brando.’”

Likewise, Mr. Feiffer doubted the suitability of Ann-Margret, whom he had seen in Elvis Presley movies, and whom he thought too obviously sexy. He wanted vulnerability.

“It was the only time I asked Mike to give a screen test,” he said.

After watching her for “30 seconds,” he changed his mind.

As for Candice Bergen: “She did better than she had ever done before because she trusted the people she was working with. She loved Mike, Jack and Artie. And she relaxed and went with it, because she knew it was probably going to be an important film,” he said.

And indeed it was an important film. A great film.

It certainly showed those doubters in Hollywood something.

And it showed Mr. Feiffer something too.

“I know how to write these things. I don’t know how to cast them,” he said.