Screenshot of Cardin’s deleted response to rapper Ski Money’s endorsement.

The Baltimore rapper known as Ski Money seemed to have just the right stuff to help Del. Jon S. Cardin (D-Baltimore County) grab a piece of the youth vote in the Maryland attorney general’s race.

When he sidled up to Cardin during a fundraiser this week, the hip-hop artist offered not just a social media shout-out and some street cred, but a $100 campaign donation, too.

By Friday, Cardin was scrambling to distance himself from Ski Money after learning that the rapper came with a rap sheet that includes charges of human trafficking.

In a written statement, Cardin said he was “appalled” to hear of the charges against Ski Money, whose legal name is Lawrence S. Christian. His $100 donation was rapidly returned.

The endorsement, and its quick repudiation, illustrate the risks faced by political candidates who want to harness the mercurial powers of social media while still controlling their campaign message. It also complicates Cardin’s upstart effort to win the Democratic nomination to run to become Maryland’s chief law enforcement officer. The primary is June 24.

“I do not accept Mr. Christian’s support,” Cardin said. “I’ve actively fought to eradicate human trafficking throughout my political career, and as attorney general I will continue to aggressively combat this awful behavior.”

Christian was charged in 2013 with multiple counts of human trafficking and prostitution, Baltimore County Circuit Court records show. A trial is scheduled this month. Court records show Christian has criminal convictions for illegal possession of a handgun and drugs. His LinkedIn profile says that he began his musical career in April 2011 — after leaving prison.

Richard M. Karceski, a Towson attorney who is handling Christian’s pending criminal case, said the trafficking and prostitution charges are unfounded. “I’ve looked into the matter, and I don’t think the woman who is the complainant has much credibility,” he said.

Efforts to contact Christian via Facebook and e-mail and by phone were unsuccessful.

The fundraiser where the rapper met Cardin was held in the office of former entertainment lawyer Paul W. Gardner, who represented White House party crashers Tareq and Michaele Salahi in 2009 and was disbarred in 2011 for mishandling thousands of dollars of client money. Former Baltimore mayor Sheila Dixon (D), who was convicted of embezzlement in 2009, attended the catered party, according to Gardner’s Twitter account.

After Cardin and Ski Money were photographed together, the rapper blasted the picture onto social media with a message of support, which Cardin’s campaign happily retweeted.

It was only after the endorsement bounced around Instagram and Twitter that Cardin learned that Christian, 37, has what Cardin described as “a questionable history.”

His campaign quickly removed its social media postings.

Early polls showed Cardin as the front-runner in the three-way Democratic primary, based at least in part on name recognition as the nephew of U.S. Sen. Benjamin L. Cardin (D-Md). But Jon Cardin has come in for criticism about his ethics and legislative attendance record.

He had to apologize for using a Baltimore City police boat and helicopter to stage a marriage proposal in 2009 and was dinged for absenteeism during the General Assembly session in Annapolis — but seeking reimbursement for most of his meals anyway.

The three-term delegate missed 75 percent of his committee votes, but still requested $2,688, or $42 per diem, for nearly every day of the recent 90-day session. Cardin said he attended the session most days but had to be home in the evenings for medical appointments with his pregnant wife.

Democratic leaders in the state, including Gov. Martin O’Malley, have rallied behind another candidate for attorney general, state Sen. Brian E. Frosh (D-Montgomery).

Del. Aisha N. Braveboy (D-Prince George’s), who is also seeking the nomination, used Cardin’s latest controversy to tout her own efforts to combat human trafficking but also expressed sympathy for her rival’s misstep.

“You can’t screen everyone that wants to endorse you or say that they are supporting you,” Braveboy said.

Frosh, who chairs the Senate Judicial Proceedings Committee, was not in a pardoning mood. “First of all, you’re running to be the chief legal officer of the state of Maryland, and you have a disbarred lawyer throw a fundraiser for you?” he said. “And then you are proud to accept an endorsement without knowing that the guy has been charged with 22 counts of human trafficking and prostitution? It shows horrendous judgment.

In an interview Friday, Cardin said that it is complicated trying to run a political campaign in today’s plugged-in media world.

“Certainly, if I had to do that all over again, I’d do it differently, but I can’t research every person I meet on the street,” he said. “The perils of technology are things we try to stay two steps ahead of.”

Cardin also said it would be wrong to shun political overtures by hip-hop artists just because rap music and culture sometimes celebrate the image of the outlaw.

“Do you think that rappers and people interested in hip-hop somehow shouldn’t be politically active and be treated with respect and dignity?” Cardin said.

Jennifer B. Jenkins contributed to this report.