Around 1 a.m., authorities were called to the building on Tower Boulevard, near Durham-Chapel Hill Boulevard for the security alert.
When officers arrived, they found a man on the roof and a brief standoff began when they said he refused to come down.
In a news release, the Durham Police Department said 25-year-old Brendan Phillip Cannell of Chapel Hill's "actions led officers to believe he was posing a potential imminent deadly threat; therefore, shots were fired at the suspect." Police didn't say what Cannell was allegedly doing.
People staying in a hotel across the street reported hearing gunshots.
"I heard some man shouting very loud and very angry," nearby resident Dorothy Hermanni said. "And then okay I thought, 'okay, there's maybe some, something going on and I didn't recognize it so much.' Then they shout again. And then there were about like say 10 or 12 very loud shots."
People who hear shootings can sometimes be mistaken about the number of shots, but others who also heard it and saw the commotion are adamant that at least 10 shots were fired.
"Ten, 15 shots and just real rapid, one right after another," hotel resident Teresa Hill said. "It wasn't like an automatic weapon, but several shots being fired - bam, bam, bam, bam, bam, bam, bam."
Cannell was not hit by the police gunfire, but he was injured in the arm when he jumped off the roof trying to get away. He was apparently unarmed.
It is still unclear why Cannell was at the Social Security office.
"That's very strange, maybe because he was given something or not given something ... but there's no money," Hermanni said.
"I don't know why somebody would want to break into an empty Social Security building, but I'm glad he wasn't killed." Hill said.
Records show Cannell is currently on federal probation for a break-in at a DMV office in Carrboro in 2008.
Police said Cannell is now charged with felony breaking and entering, damage to property, and resisting arrest.
The police shooting is being investigated by the Durham Police Department's Criminal Investigations Division and Professional Standards Division, which is standard procedure.