Martin Shkreli's incessant tweeting and crass statements aren't going to fly with his new hotshot lawyer.

Ben Brafman said on CNBC on Thursday that he isn't condoning Shkreli's controversial tweeting.

Earlier in the day, shortly after appearing at a Congressional hearing, Shkreli called the lawmakers "imbeciles" on Twitter.

"It's unfortunate," said Brafman, who's defended celebrity clients like Michael Jackson and Jay-Z. "He's young, he's inexperienced. It was a regrettable choice of words."

Shkreli, a 32-year-old former pharmaceutical CEO, hired Brafman five days ago to start representing him in federal court. He's facing criminal charges for securities fraud.

Those charges are unrelated to the reason he appeared before a House committee in D.C. on Thursday: Drug price gouging.

Shkreli became the center of national attention after hiking the price of a potentially lifesaving drug more than 5000% overnight while he was the top executive at Turing Pharmaceuticals.

He was subpoenaed to testify before the committee, which is investigating the pharmaceutical industry.

Related: The best moments from Shkreli's hearing

On Brafman's advice, Shkreli stonewalled committee members' questions by citing his Fifth Amendment right against self-incrimination -- and he did so with overt smugness and occasinal smirk. Brafman said he wishes Shkreli had been more stone-faced.

"You cannot change a person, you can only advise a person," Brafman said.

Brafman said he's hope Shkreli will "keep a low profile," but the attorney has his work cut out for him. Shkreli is known to relish attention and controversy.

He regularly hosts hours-long live streams, and he was chatting with strangers on Blab, a social network that encourages video chats, just hours after the hearing wrapped up.

Brafman said Shkreli's public perception will be one of his biggest hangups in court. He said the price gouging scandal could "bleed into his ability to have a fair trial on charges that are otherwise defensible."

Related: Martin Shkreli in 86 seconds

Brafman may detest Shkreli's penchant for bad publicity, but he also called the former CEO "a genius and a scientist" who's simply misunderstood.

"He's been vilified and that's unfair," Brafman said during his CNBC interview.