Margera's attorney, Michael Van Der Veen, said he is being released after a "good day in court" on Wednesday.
"He is back on the road to his successful career and wonderful life with his wife," Van Der Veen said.
Margera was arrested last week on suspicion of DUI in Fulton County, Pennsylvania.
His arrest led to a bench warrant in Chester County, Pa., for violation of probation after he plead guilty in June to a family altercation.
ALSO SEE: Bam Margera speaks exclusively with Action News ahead of assault trial
Margera appeared in court on Monday, where the judge decided to hold him at the time, as well as ordered him to undergo a drug and alcohol evaluation.
The Chester County judge expressed concerns over Margera's previous DUI arrest in California back in 2018, which he said was his reason for holding the former star for evaluation. Until then, the judge says he was unwilling to release Margera and give him any opportunity to get behind a wheel and potentially kill somebody.
"Everybody in the courtroom is interested in his help, but he is too. He's interested in getting better. He's interested in getting this case behind him and we're going to make sure that happens," Van Der Veen said on Monday.