It happened around 2 a.m. outside Bam’s bar “The Note” (142 East Market Street), investigators say.
Police say 59-year-old Elizabeth Ray allegedly hit Margera in the back of the head with a baseball bat. Ray was arrested and charged with assault.
Margera was recuperating at Chester County Hospital but has since been released.
TMZ, who first reported the incident, posted pictures of Margera after he was allegedly hit.
Brandon Cole Margera, a Pennsylvania native best known as "Bam" became a household name in 2000 when he, Johnny Knoxville, and a crew of pranksters, starred in MTV's crude reality stunt show "Jackass."
The show caused a whirlwind of controversy because of the dangerous and risky stunts that involed fire, nudity, and often ended in broken bones.
Nevertheless "Jackass' was a huge success, but ended after only 3 seasons.
Following the show, Margera starred in MTV spinoff "Viva La Bam," two "Jackass" movies, and hosted "Radio Bam" on Sirius radio.