A New Zealand Police spokeswoman said the man entered Fairfield Takeaways, on the corner of Main Rd and Hartley St, about 5.55pm and tried to take money from the store.
The man was reported to be disguised, with a partially covered face, wearing a hat, a jacket and long pants of unknown colours.
He was of skinny build and about 1.8m tall.
She said nothing was stolen, but the man drove off in a vehicle towards Mosgiel.
Several police vehicles were dispatched and the alleged offender was apprehended by 6.20pm.
Police this morning said a 25-year-old man had been charged with assault with intent to rob and would be appearing in court today.