The attack happened in the courtroom around 5 p.m. at the Moss Justice Center, according to a report by the York County Sheriff's Office.
The video shows Lamarcus Williamson raising his shackled arms up and hitting his public defender, Daniel Hall, in the mouth. The assault occurred in front of the judge and other courtroom officials, who were also caught on camera.
According to ABC affiliate WSOC, Williamson was in court to plead guilty to robbery, drug and assault charges. He was sentenced to 15 years in prison on the original charges, and the judge tacked on another six months for criminal content.