The incident took place in Park Square on Saturday.
A South Yorkshire Police spokesman said officers had challenged a man after a robbery, and he fled on foot.
He was chased into the city centre and arrested at the Castle Square tram stop.
When he was searched, police found the man was carrying a knife.
He was arrested on suspicion of robbery and possession of an offensive weapon.
The @SYP_Specials Twitter account posted a photo of the knife that was seized, to which det supt Una Jennings, the force lead for knife crime, responded: "Great work!! @SYP_Specials you guys and girls are heroes."