South Yorkshire Police described the incident in Darnall as ‘shocking’.
A police search was mounted and the men were tracked down on Industry Road.
One man fled but was caught by a police dog and when he was searched by officers he was found with a gun in a man-bag and a knife in the waistband of his trousers.
The other was arrested by armed officers and found with an axe down his trousers.
South Yorkshire Police said: “Dog handler Matt and Luna notched up another arrest when they responded to an incident in Darnall in support of our armed response officers – a shocking incident reportedly involving two men riding an e-scooter around the area with what looked like a gun and brandishing a knife.
“Some clever teamwork resulted in dismounting the offenders on Industry Road and presenting them with the dilemma of ‘fight or flight’. It makes no difference to us, our police dogs enjoy a fight as much as a chase.
“Anyway, flight was one chap’s preferred option.
“For the second time in a week Luna showed her turn of speed and it was game over for him, finding the knife in his waistband and the gun in his ‘man-bag’ sealed his fate.
“The other one? Firearms officers collared him, and the axe they found down his trousers ensured that he was off to the cells also.”