In his lyrics, Kodak Black vows to let his “soul bleed on the track,” and it’s a promise the 21-year-old rapper always keeps. When Kodak raps about his struggles, the pain is palpable. “You know death right around the corner and prison my next-door neighbor,” he intones on his latest album, “Dying to Live.”

It’s Kodak’s preternatural ability to paint pictures about his come-up in rap and extravagant, law-straddling, post-fame life that makes him one of the genre’s brightest stars.

But for all his talents, Kodak — born Dieuson Octave, before changing his name to Bill K. Kapri — is a controversial figure. That same lyrical paintbrush has been used as a weapon, and he’s drawn backlash for making offensive comments. He has a record of drug and weapons charges, including an arrest last week at the U.S.-Canada border. On Wednesday, before he was set to perform at the Anthem in Washington, five people were arrested on suspicion of carrying guns without licenses on a tour bus outside the venue. (D.C. police were unable to confirm whether the tour bus was Kodak’s.)

Kodak, accused of raping a woman after a 2016 concert, is awaiting trial in South Carolina on a charge of first-degree criminal sexual misconduct for which he faces up to 30 years in prison. In a since-deleted Instagram post about the trial, he wrote, “I look forward to clearing my name in the near future.”

Despite the charges, his ascent in the music industry has continued uninterrupted. His 2017 album “Painting Pictures” hit No. 3 on the Billboard charts; last year’s “Dying to Live” topped it. He’s still signed to Atlantic Records, and he’s still headlining shows produced by concert behemoth Live Nation, such as the one at the Anthem.

At the concert, the crowd barely filled out the front half of the floor. These fans had to reconcile everything — Kodak’s talent and Kodak’s transgressions — on their own, that is, if they even knew there was something to wrestle with at all.

When asked about Kodak’s various controversies on Wednesday, teenage and 20-something fans had an incomplete picture of what the rapper is facing.

“Didn’t he just get arrested?” asked Syra Khan, 22. (Yes, at the border.) She was familiar with the rape charge against Kodak, but asked, “Didn’t his charges get dropped?” (No, they haven’t.)

Others hadn’t heard of the rape charge, and even among those who had, there was a hesitance by some to believe the accuser, even amid the #MeToo movement that has changed how we reckon with accusations against powerful men such as Michael Jackson and R. Kelly. Many focused on the case’s undecided nature.

“Is he accused, or is he guilty? There’s a difference,” said Roma Khan, 25. “How many famous people get accused of rape all the time?”

And if he is found guilty?

“I might feel some type of way . . . of course it changes how you view things, especially as a woman. The statistics of rape [are] so high, it would be hypocritical of me to stand behind a guy that is accused of raping another woman,” Khan continued.

That Kodak is being persecuted — for being young, gifted and black — was a repeated refrain.

“Some of our favorite athletes and artists have gone through plenty of legal issues and we have . . . been able to forgive them and support them at their craft,” said Lucy Hopkins, 25, mentioning the sexual-assault allegation against Kobe Bryant and Gucci Mane’s jail time in the same breath. (The criminal case against Bryant was dropped, and a civil lawsuit was settled privately.) In other conversations, Kodak was compared to Tupac Shakur, who was convicted of first-degree sexual abuse but has maintained legendary status since his 1996 killing.

Kodak has embraced a persecution narrative both in his music and in his live show. He calls himself “god-sent” and raps about resurrection; his album cover sees him baptized in blood. Among the 3D graphics looping on a screen behind him onstage were countless crosses: Sometimes his digital avatar was on an infinite walk toward one on the horizon, sometimes his digital corpse was lying beside one, sometimes he was already crucified.

Onstage, he made nods to Tupac, comparing his Sniper Gang crew to Death Row, and paraphrasing a Tupac album title. “Sniper Gang against the world,” he proclaimed, “that’s how I be feeling.” He blamed his concert-long petulance on law enforcement, claiming they were why his DJ didn’t have his laptop, which prevented Kodak from being able to perform as intended. (The D.C. police said no one was allowed on the bus while evidence was being collected.)

Kodak often raps poignantly about systemic poverty, broken families and the injustices of the American justice system, all of which have marked his life. He grew up in the South Florida projects, first rapping in a trap house while in elementary school. A carjacking charge reportedly followed when he was just in middle school, and he spent his teens in and out of school and juvenile detention centers. His father was absent, and he once rapped, “Growing up with no father, it’ll make you evil / How he gon’ learn to be a man when you ain’t never teach him?”

These are all significant obstacles. But many people, in rap or not, have persevered with fewer second chances than Kodak has been afforded because of his talent, charisma and ability to make money for record labels and concert promoters. Most have done so without facing a charge of raping a woman.

“Can I ball? Can I chill? Can I stunt? Will I live long enough to raise my son?” he once rapped. “Can your boy do something productive for once?”

Whether or not he can will be up to Kodak Black. The question is whether it will matter to his remaining fans.