Paul Mooney, who was comedian Richard Pryor’s longtime writing partner and became known as an incisive, barrier-breaking comic in his own right, creating characters such as the all-seeing Negrodamus on Dave Chappelle’s sketch comedy show, died May 19 at his home in Oakland, Calif. He was 79.

The cause was a heart attack, said his publicist, Cassandra Williams.

A onetime circus ringmaster, Mr. Mooney got into comedy after watching Lenny Bruce perform at a bar in the early 1960s. He went on to adopt a similarly profane style, with routines about American politics and racism, mocking stereotypes about Black people and incorporating the n-word into his stand-up in an effort to deprive the term of its power.

In one routine, he excoriated Hollywood movies about race, questioning a premise behind the basketball movie “White Men Can’t Jump.”

“White men can’t jump? They don’t have to,” he said. “They own the team.”

Mr. Mooney was initially known for his backstage partnership with Pryor, who made biting commentary about American and specifically African American life a central theme of his stand-up. The duo worked together on movies, comedy specials and television shows such as “Saturday Night Live,” which Pryor agreed to host in 1975 after insisting that Mr. Mooney serve as a guest writer.

In an electric high point of the episode, Pryor played a job applicant who interviews with Chevy Chase, the show’s breakout star. An ensuing word-association test devolved into an increasingly dangerous exchange of racial slurs. Often cited as one of the greatest sketches in SNL history — Mr. Mooney likened it to a hydrogen bomb that he and Pryor dropped on “America’s consciousness” — the sketch also inspired debate over its authorship, with Chase and Mr. Mooney both taking credit.

For his part, Mr. Mooney said the concept was inspired by a patronizing exchange he had with SNL creator Lorne Michaels, who questioned his comedy credentials at length before allowing him to work on the show. “Easiest sketch I ever write,” he recalled in a 2007 memoir, “Black Is the New White.” “All I do is bring out what is going on beneath the surface of that interview with Lorne and the NBC execs in the jai alai greenroom.”

Mr. Mooney later served as a writer and occasional actor on the Fox sketch comedy series “In Living Color,” developing the character Homey D. Clown, a dejected children’s entertainer (played by Damon Wayans) who refuses to degrade himself by dancing for kids: “Homey don’t play that!” Instead, he tells them a story about the time he was hassled by the head waiter at “a fancy White restaurant” called Chez Whitey.

Even as he wrote for movies and television shows, Mr. Mooney performed on the stage and screen, playing Sam Cooke in “The Buddy Holly Story” (1978); an NAACP chief in actor-director Robert Townsend’s comedy “Hollywood Shuffle” (1987); and a stand-up comedian named Junebug in “Bamboozled” (2000), director Spike Lee’s satire about a modern Black minstrel show.

He also became known as a member of “the Black Pack,” a comedy clique that included Townsend, Eddie Murphy, Arsenio Hall and Keenen Ivory Wayans, although he was often overshadowed by his peers. “Some of the stuff he’d say would hit home so hard people in the audience would go, ‘This ain’t funny,’ ” Townsend said in a 2016 interview with New York magazine.

Mr. Mooney experienced a career resurgence in the early 2000s after bringing his incendiary brand of comedy to “Chappelle’s Show,” in which he played Negrodamus, a Black version of the purported seer Nostradamus. Asked why White people loved actor and comedian Wayne Brady, he replied that it was “because he makes Bryant Gumbel look like Malcolm X.”

He also appeared in the show’s “Ask a Black Dude” sketches, once answering a question about why African Americans walked with such swagger. He responded with a nod toward centuries of anti-Black discrimination.

“Black people walk like that because we’ve got style, we’ve got flavor, we’ve got rhythm,” he said. “I mean, the Black man in America is the most copied man on this planet, bar none. Everybody wants to be [Black],” he continued, using the n-word, “but nobody wants to be [Black].”

He was born Paul Gladney in Shreveport, La., and grew up in Oakland. Biographical sources alternately give his 1941 birth date as Aug. 4 and 5. His parents were teenagers at the time, and he was raised mainly by his grandmother, who nicknamed him Mooney, which he later adopted as his stage name.

As a teen, he competed in dance contests and eventually performed on the television show “Dance Party,” a California alternative to “American Bandstand.” He later served in the Army and joined the Gatti-Charles Circus after seeing a help-wanted ad for a ringmaster.

Mr. Mooney said he met Pryor in the late 1960s, while hosting a party at his Sunset Boulevard bungalow. Their relationship started off poorly — he said he threw Pryor out after the comedian suggested everyone “get in bed and have a freak thing” — but improved after Pryor borrowed one of his jokes, then gave him a $10,000 watch as a token of thanks.

In the early 1970s, at a time when few African American writers were working on television, they collaborated to write episodes of “Sanford and Son.” Mr. Mooney later wrote for “The Richard Pryor Show,” a short-lived 1977 variety series that included up-and-coming comedians such as Robin Williams and Sandra Bernhard, and appeared with Pryor in film comedies such as “Which Way Is Up?” (1977) and “Bustin’ Loose” (1981).

Together with Rocco Urbisci they wrote the script for “Jo Jo Dancer, Your Life Is Calling” (1986), which Pryor directed and starred in as a comedian who — as he had in real life — set himself on fire while freebasing cocaine.

“Whenever I read reviews about what a comic genius Richard is, I have the same response: I know him too well,” Mr. Mooney wrote in his memoir. “Yeah, Richard Pryor is the funniest man America has ever seen. (Mark Twain is runner-up. Richard is Dark Twain.) But I know he is a junkie first, and a genius second. That’s cold, but it’s the hard, sad truth.”

Mr. Mooney was married and divorced at least once and had several children. Complete information on survivors was not immediately available.

In 2006, he made headlines when he renounced the n-word after comedian Michael Richards’s racist outburst at the Laugh Factory. But he continued performing with his usual bluntness, as when he declared in a 2012 comedy special that the only way to end racism was to “kill every White person on this planet.”

“I like when people are trapped in the joke, when there’s no escape,” he told Canada’s Globe and Mail newspaper in 2014. “I like to lead people down the wrong path and then trap them.”