Police, including members of the police dog team, were called to On the Spot dairy in Wakari, after an employee reported an attempted robbery.
A police spokeswoman said the man allegedly entered the shop in Taieri Rd with a baseball bat before fleeing to the nearby Caltex petrol station.
Police located the 37-year-old man a short time later and arrested him, the spokeswoman said.
A member of the dog team could be seen searching a property in Berwick St after the man was arrested.
He will appear in the Dunedin District Court today charged with demands to steal.
The dairy remained open during the incident and the service station reopened about 20 minutes after the man was arrested.
The dairy employee said nothing was taken and he was uninjured.