The man was in his late 20s and early 30s and it was unclear if he was a former or current employee, said Police Chief Kevin Murphy. He did not name the suspect and said federal postal officials would decide on charges.
Post office employees called 911 at about 6:38 p.m. reporting gunshots. Several officers were at a nearby shopping center on holiday patrol and arrived quickly. They had the man in custody within 10 minutes, the chief said.
"I think that saved a lot of lives," Murphy said.
It was unclear how many shots the man fired inside the large, two-story sprawling center that processes mail for Alabama's capital city of about 205,000 people.
Employees were allowed back in the building at about 8 p.m. About 200 work at the post office located in a commercial area of the city, right next to Auburn University's Montgomery campus.
An after-hours message left with postal officials in Washington was no immediately returned.