The 31-year-old was arrested on suspicion of affray after armed response officers were immediately deployed to Peel Street.
He dropped the weapon following actions from unarmed officers and then ran, climbing onto the bridge on West Way before being brought to safety.
Superintendent Paul McCurry said: “If you have any information, photos or video footage that might help us, please contact 101 quoting incident number 75 of May 9.”
Barnsley Central MP Dan Jarvis added: “It was deeply concerning to see the incident in Barnsley town centre over the weekend.
“I am in touch with South Yorkshire Police and my heartfelt thanks goes to the dedicated officers who worked swiftly and courageously to resolve the issue.
“Their tireless efforts continue to keep our local residents and communities safe.”