Police were called to Highland House, in lower Stuart St, about 10.50am to "locate a person of interest" who subsequently tried to evade officers.
He apparently smashed multiple windows on the first floor, and also appeared to have smashed a glass door inside the building, before climbing on to the awning.
Dozens of people watched from nearby footpaths while several police officers, who had cordoned off the street between Cumberland St and Moray Pl, talked to the man from the road.
Six police cars were visible at the scene.
Before he was taken into custody just before 11.30am, the man was heard yelling about Probation Services being "corrupt".
The building houses the Department of Corrections.
A man spoken to at the scene said he was in the building when the man decided to go on a "bit of an escapade".
He did not think too much of it when he saw police officers in the building, but then he heard loud thumping and breaking glass.
When it was safe, people inside the building were escorted out, he said.
The alleged offender was charged with wilful damage and breaching detention conditions, police said.