Staten Island Assembly candidate Bobby Digi has a lengthy rap sheet — and he says that’s because cops racially profiled him for decades.

Digi, an activist and North Shore Democrat whose legal name is Henry Olisa, has been arrested at least 10 times between 2000 and 2014, according to Office of Court Administration documents obtained by The Post.

“Those were racial profiling, period,” Digi told The Post. “It’s something I still deal with today. I drive a nice car, which I’ve worked hard to purchase, and I get pulled over because I have dreads.”

He’s faced 23 charges, including menacing, criminal possession of a weapon, harassment, attempted assault and, most recently, driving without a license, but most were tossed.

Twelve were dismissed and another six were dropped because he pled guilty to lesser crimes, including four violations for driving without a license, and harassment in a 2000 Bronx case when he was 26.

He said he was arrested for trying to mediate a conflict and that he pled down to harassment because he had a court-appointed attorney and the case was dragging on. Digi said he didn’t have his driver’s license during the other arrests that ended in guilty pleas.

Digi couldn’t recall specifics about some of the arrests. He said he could not remember details of the weapon case. Records for all of the cases are sealed.

In one case he said neighbors were being “harassed” by cops and he stepped in.

“They thought I was a smart aleck, then they surrounded me. I got arrested and I was verbally assaulted,” Digi said.

A cop used foul language and Digi filed a formal complaint against him. The officer was forced to apologize by the Civilian Complaint Review Board, he claims.

“He told me, ‘Why didn’t you just tell me who you were?’” Digi recalled. “I said, ‘Why do I have to tell you who I am?’”

Digi said he’s filed four complaints about police treatment and that was the only time the CCRB followed up.

Now 44, Digi’s running in the Sept. 13 primary for the 61st Assembly seat after incumbent Matthew Titone decided to seek a Surrogate Court judgeship. Charles Fall, a former aide to Mayor de Blasio, and Patricia Kane, an open-heart surgery nurse and union leader, are also running.

In July Digi was backed by District Council 37, the largest public service union in the city.

He’s also been endorsed by his baby mama, Brooklyn Councilwoman and Democratic Majority Leader Laurie Cumbo. They have a 1-year-old son together. She said at a May campaign kickoff others in the race “do not have leadership experience.”

His campaign raised $31,986 between April 30 and July 12, filings show.

Digi said those who have endorsed him and other supporters have received anonymous packages with information about his arrest record.

“They’re using that to try to deprive me of endorsements,” Digi said, declining to say who he believes is behind smear campaign. “They’re sending it to my family members, sharing with my business associates.”

He was recently elected president of the Staten Island Democratic Association and created a youth development nonprofit called Island Voice. Digi also runs several businesses.

“I’m not carrying this angry black man attitude around. I’m taking my struggles and tribulations and translating that to positive energy to empower young people,” Digi said.

An NYPD spokesman said, “The NYPD enforces the law fairly and equally, and works tirelessly every day to keep every resident and every neighborhood safe.”