On 18 September 1977, when Richard Pryor took the stage of the Hollywood Bowl as a headliner of the Star-Spangled Night for Rights – a benefit promoted by an early gay rights group – the event had, according to one journalist, “all the makings of a cabaret version of Woodstock”. Less than 15 minutes later, when Pryor ended by asking the audience to “kiss my happy, rich black ass”, the concert was closer to a cabaret version of Altamont. The good vibes had dispersed; a night of unity had turned into a hot, steaming mess. Many in the crowd booed or shouted abuse: “Richard Pryor, you just committed professional suicide!” or “Kiss your ass, hell! I’d like to put a hot poker up it!” Others cheered a provocateur who, before he had dismissed the crowd as self-serving “faggots”, had spoken bravely about the joy of gay sex and exposed the fault lines of the gay rights movement.

Still others sat poleaxed, trying to grasp how, in coming to the Hollywood Bowl, they had taken a detour into the Twilight Zone. “In more than 14 years of covering the great, near-great and terrible of show business, I have never seen anything like it,” wrote John Wasserman in the San Francisco Chronicle. “To call what happened bizarre would not, for me, do it justice. It was like watching a person come unglued in front of you and then, as in a cartoon, disappear piece by piece.”

The meltdown at the Hollywood Bowl was, in its own way, a vintage Pryor performance: artful and impulsive, merciless and hapless, and above all, devilishly attuned to the hidden dynamics of the moment. The driving force behind the benefit concert had been the Save Our Human Rights Foundation, a San Francisco group composed largely of gay professionals, formed in response to the anti-gay crusade spearheaded by Anita Bryant and other Christian conservatives in Florida.

The foundation hoped to do for gay rights what the American Cancer Society had done for cancer: “to educate people, but in a nice glossy way”. Dignity was of utmost concern. When the show’s producer discovered that one of his performers, a comedy act, would satirise Bryant directly, the act was removed from the bill; the appeal for “human rights” meant always aiming for the moral high ground.

Facebook Twitter Pinterest ‘I came here for human rights’ ... Pryor at the Hollywood Bowl. Photograph: Lennox McLendon/AP

The 17,000 people assembled at the Bowl, mostly gay men, sang the national anthem “with the volume and fervour usually associated with conventions of the veterans of foreign wars”. Performers avoided specific mention of gay life, much less gay sex; in the words of another observer, it was “an evening of unspoken assumptions”. Richard’s friend Lily Tomlin came the closest to striking a direct chord when she reminisced about the 1950s as a time “when sex was dirty ... and, of course, no one was gay, only shy”.

Over the course of the evening, Pryor grew increasingly allergic to the atmosphere of moral superiority. He despised euphemisms, and yet here he was headlining a gay rights benefit that couldn’t put the word gay in its title. He felt the victim of a bait and switch; like at least one other black artist on the programme, he’d originally been asked to perform for a human rights rally, pure and simple. Other resentments gathered. He scanned the sea of faces in the audience and spotted only a handful of black people. And he noticed that the Lockers, a young black dance group on the bill, kept suffering from poor treatment. When the dancers asked stagehands for help with the lights, the stagehands paid no notice; when the dancers performed onstage – one jumped over six chairs in a single bound – the audience sat in their seats. An hour later, just before Pryor was set to perform, the formerly indifferent stagehands leapt to fix the lights for two white ballet dancers; and the formerly blasé audience applauded them as if they were “some bad motherfuckers”. Backstage Pryor saw the fire marshal dress-down a Locker for setting off a small explosive onstage as a special effect, and he saw the show’s promoters refuse to come to the dancer’s defence.

To Pryor, all this was racism in action. He simmered, and awaited his turn. When he finally walked in front of the audience, Pryor didn’t speak for a little while; he prowled back and forth like a pent-up animal. Then he pounced: “I came here for human rights,” he said, “and I found out what it was really about was about not getting caught with a dick in your mouth.” The crowd erupted in laughter.

“You don’t want the police to kick your ass if you’re sucking the dick, and that’s fair,” Pryor continued. “You’ve got the right to suck anything you want!” With three sentences, Pryor had outflanked all the other performers on the bill – some of whom, like Tomlin, had open ties to the gay community – by stripping away the airy talk of “human rights”. He had brought into the open the basic demand of the gay struggle: sexual freedom in the face of police harassment.

“I sucked one dick,” he said from the stage, drawing his audience back into a scene from his red-light district childhood. “Back in 1952. Sucked Wilbur Harp’s dick. It was beautiful, but I couldn’t deal with it. Had to leave it alone.” The crowd roared. “It was beautiful because Wilbur has the best booty in the world. Now I’m saying booty to be nice. I’m talking about ass-hole. Wilbur had some good ass-hole. And Wilbur would give it up so good and put his thighs against your waist. That would make you come quick.” With that confession, Pryor became perhaps the first major Hollywood celebrity to talk graphically about his own positive experience of gay sex – and certainly the first to do so in front of tens of thousands of people.

Facebook Twitter Pinterest Cutting from a press report on the Star-Spangled Night

Pryor then spoke of the romance it kindled in him: “I was the only motherfucker that took Wilbur roses. Everybody else was bullshitting. I took Wilbur [the roses] and said, ‘Here, dear.’” Again the crowd hooted in delighted disbelief.

Now that he had worked the audience into the palm of his hand, Pryor became indecisive – addled by some combination of drugs, alcohol and the complexity of his feelings. Speaking softly into the microphone, as if musing to himself, he asked, “How can faggots be racists?” He recounted what he’d observed with the Lockers, then his tone shifted and he aimed pure scorn at the audience: “I hope the police catch you motherfuckers and shoot your ass accidentally, because you motherfuckers ain’t helpin’ niggers at all.” Howls rose up from the crowd. Any remaining sympathy he threw away with a rant that pitted women’s rights against welfare rights (“Motherfuck women’s rights. The bitches don’t need no rights. What they need to do is pay the people on welfare”). The crowd booed in response, and Pryor goaded them back: “Yeah, get mad. ’Cause you’re going to be madder than that when [police chief] Ed Davis catches you motherfuckers coming out of here in the lot.”

It was hard to tell where Pryor’s allegiances lay. Was he on the side of the police or the side of sexual freedom? Or simply on the side of Richard Pryor? “I wanted to test you to your motherfuckin’ soul,” he continued, as if the anger he’d unleashed was a thought experiment on his part, a trial he’d designed to winkle out the truth in their hearts.

The gay people in the audience, he determined, were the same gay people who, a decade earlier, had looked the other way at the black community’s desperation: “When the niggers were burning down Watts, you motherfuckers were doing what you wanted on Hollywood Boulevard, didn’t give a shit about it.” With that, he hoisted his backside into the air, asked the crowd to kiss it, then walked off to a chorus of boos, a smattering of applause, and thousands of sullen faces. The show’s choreographer came onstage and cried in anguish, “I hope you realise that was unplanned and everybody involved is very, very embarrassed about it.” He was promptly booed, too.

Facebook Twitter Pinterest Lily Tomlin, Bette Midler and other Star-Spangled performers on stage. Photograph: Lennox McLendon/AP

Pryor had left a mess that no apology could clean up. It took two weeks for the firestorm sparked by Pryor’s performance to blow through the LA and Bay Area press. (The Los Angeles Times devoted over a full page to the original event, then ran 17 letters in two instalments in response to it.) The bad feeling lingered.

Among the commentators, most numerous were the moralists who judged Pryor an obscene homophobe who should never have been permitted onstage at the Bowl. “His ‘street’ language was abusive, filthy, and racist,” wrote one audience member in the Los Angeles Times. “It takes a certain talent, genius (if you will) to insult 17,000 people – black, white, male, female, straight, gay, rich and poor – at one time.” Others thought Pryor wrong in his sweeping comments about gay racism. “[M]ost of us in the gay rights movement (which does not include all gay men and women) were previously involved in other civil rights movements such as those for black and women’s liberation,” an activist explained. “Now we are fighting for our own rights and we need support, especially from those we have supported in the past.”

Yet Pryor did have his defenders among the gay community’s outliers, those further from its power centres, who praised him for forcing the community to examine its own blind spots. A Los Angeles Times reader wrote: “Being a black homosexual and living here practically all my life, I can say that the California homosexual is the most extreme of bigots. He hates blacks, fats, women, and himself most of all. Pryor’s actions were crude, but sadly true. If one refuses to believe, let any person who is fat, black, ugly or female try going to a gay club alone.” (In fact, as LA’s gay activists noted to their displeasure on other occasions, the city’s biggest gay disco admitted few non-whites or women, and its gay baths tended to have a “pull up your shirt” rule that excluded any man who wasn’t well toned.) Lily Tomlin felt that gay men tended to look down upon lesbians, and she appreciated how Pryor had asked everyone to consider their prejudices. “When you hire Richard Pryor, you get Richard Pryor,” she’d told the show’s producer before the event.

Lost in the swirl of postmortems was the taboo Pryor had broken and the anecdote he had revealed. Part of the silence is understandable: a family newspaper, for instance, was not about to quote a line like “Wilbur had some good ass-hole.” But other distortions were more complicated. The outrageousness of Pryor’s remarks seems to have inspired either mishearing or disbelief. Several journalists reported that Richard had said that he experimented with a gay man and “didn’t like it”. One called Wilbur Harp a “presumably fictitious Midwestern homosexual”, as if a male sex partner for Richard Pryor had to be a figment of the comic’s crazed imagination.

Facebook Twitter Pinterest Paul Newman at the show. Photograph: Lennox McLendon/AP

Yet Pryor was not confecting his story out of thin air. According to his friend Cecil Grubbs, Harp was a gay teenager in Pryor’s home city of Peoria, Illinois, in the 1950s, at a time when there was little in the way of a gay community there. He and Pryor whiled away the hours at the Blue Shadow bar in Peoria, a tavern famous for serving a hangover-cure chilli so spicy that its mere aroma sent customers into a sweat. In the mid-1960s, according to Harp’s brother Hillis, Richard and Wilbur crashed for weeks at the same apartment in Chicago, the would-be comedian bunking with the would-be cosmetologist. Even after Pryor moved to his estate in Northridge, Los Angeles, in 1976, the two were still close enough for Pryor to invite Harp out for a weeklong vacation. Whether or not they truly had sex is probably unknowable – Harp is dead, so he cannot speak for himself – and is perhaps less important than the fact that Pryor wished, on that night, for it to be true. He was seeking to convey something about himself and the world in which he was raised, a world distant from the affluent gay audience at the Bowl.

“In my neighbourhood whatever you were was cool,” he said in a related 1975 interview. “You could be a thief, murderer, or closet queen. There was a faggot ... that turned more tricks than the prostitutes but nobody ridiculed him. Dudes avoided him during the day but could be seen creepin’ around his house late at night. It didn’t matter. We were all part of a community.”

Sometimes, as at the Hollywood Bowl, Pryor slammed into the fact that he wasn’t in Peoria any more and that he had lost that community; that no matter how large his estate in the San Fernando Valley, he would continue to feel out of place; that no matter how high he rose in Hollywood’s pecking order, his sensibility would never match up with that of its right-thinking, liberal precincts. The debacle at the Bowl left him reeling, besieged. As the controversy raged on, Pryor did not calm the waters by issuing an apology.

Instead, he continued to act out the polarities of his Hollywood Bowl performance in his own life. In the week following the gay rights benefit, he made two impulsive and startling commitments. The first was to his on-off lover Deboragh McGuire, whom he proposed to and married within the space of a few days. The second was to an experimental piece of gay theatre – a monologue by a little-known actress named Kres Mersky that nowadays would be labelled performance art, and queer performance art at that – which he included in his primetime TV show in total defiance of NBC. As part of his segue into that monologue, Pryor camped it up as Little Richard, with the high pompadour, glittering cape, and leering lusciousness that were the trademarks of Little Richard’s gender-bending style. In that costume, Pryor blew air kisses to his audience with a twinkle in his eye.

Extracted from Becoming Richard Pryor by Scott Saul, published on 15 January by Harper, £18.99. To order a copy for £15.19 with free UK p&p go to theguardian.com/bookshop or call 0330 333 6846