Oakland police said Chris Cantrell, 50, entered the Office Depot in the 3500 block of Hollis Street at around 9:30 p.m.
Cantrell, wearing a mask and armed with what appeared to be a gun, allegedly held an unknown number of people hostage, according to police.
Oakland and Emeryville police responded to the scene. Around 4 a.m. officers entered the store and took Cantrell into custody.
Police spokeswoman Holly Joshi said all of the employees were able to escape unharmed.
Officers recovered the suspect's gun and discovered it was a replica firearm.
Surveillance showed that store employee Richard Killin, 25, assisted in the robbery, according to police.
Both men were arrested and are facing robbery charges.
A nearby Home Depot hardware store was evacuated. Most of the Office Depot employees were already out of the building by the time of the robbery, according to police.