The sheriff's office said the suspect was found and taken into custody within minutes of leaving the store.
After the crime, the suspect reportedly ran from the store with cash and a box of M&Ms.
The robber approached store employees, flashed a handgun and made them open a safe, police said video surveillance showed.
Mooresville Police arrested David Hunter with U.S. Marshals' help for an armed robbery at a local Dollar Tree.