A Brooklyn-based FDNY captain leads a double life as a hip-hop artist whose songs are peppered with the N-word, drugs, violence and anti-cop lyrics.

“F- -k them cops and swats with night vision,” he raps under the stage name Ka in a 2013 song. “I see your traps and your plots to dead us, y’all rolling with Kojaks, n- - -a, I got Berettas.”

In his other life, the gravelly voiced rapper is Kaseem Ryan, 44, a veteran firefighter who commands Engine Co. 235 in Bedford-Stuyvesant.

But Ka, who has rapped with the Wu Tang Clan’s GZA and whose 2013 album, “The Night’s Gambit,” made The Village Voice’s year-end list of best records, has tried to hide that career for years.

“I’m living two lives, man. I’m trying to be who I am in the day and then trying to feed my soul at night with being the artist that I want to be,” Ka said in a 2015 interview, without revealing his FDNY job.

The rapper is on Twitter as @BrownsvilleKa, projecting street cred and an anti-cop image.

In 2012, he tweeted: “Name 5 different slang words we refer to police in hip hop.” Responses included: jakes, pigs, swine, fuzz and them bitches. Ka “liked” them all.

Some NYPD members were disgusted that a fellow first responder could utter such language.

“The biases he portrays through his music are indicative of what he believes or feels,” said Ed Mullins, president of the Sergeants Benevolent Association.

“As a New York City firefighter, he should be trying to bring people together rather than fracture relationships, especially in communities of color.”

Reached at his firehouse, Ryan hung up the phone.

Ka’s lyrics describe ghetto life, a world of guns, dope and despair.

“You named them hustlers, killers, fiends, ex-cons. I called them cousins, aunts, pops, moms,” he raps on 2014’s “To Hull and Back.”

The song “Mr. Officer” bemoans police brutality against black youths. “Why do you wanna see me in a coffin, sir?” he asks.

Ka says he grew up poor, with 17 people crowded into his grandparents’ Brownsville house. His current life is far less gritty.

He made $148,558 as a fire captain last year, while selling rec­ords, CDs and T-shirts on his Web site. He and his wife, Michelle Valdez, chief creative officer for an entertainment firm founded by Pharrell Williams, own a $1.25 million brownstone in Park Slope.

Few fellow FDNYers know Ryan as a rapper. “I had no idea he was doing that on the side,” one said. “He’s really not a bad guy. But he shouldn’t be bad-mouthing cops.”

Additional reporting by Kenneth Garger