The 17-year-old suspect was taken into custody inside a classroom at the School of Business and Industry at 18th and Collowhill streets.
Police have not released his identity at this time.
It was around 9:30 a.m. when the suspect and another male allegedly had a dispute at a courtyard outside the Bonnell Building on the campus in the city's Spring Garden section.
Authorities tell Action News that a male reported that he was threatened by the suspect with a handgun. The gunman then allegedly ran into the nearby Winnet Student Life Building.
Police ordered everyone in the Bonnell and Winnet buildings to shelter in place as officers swept the area.
No one was injured in the incident.
Philadelphia Police Commissioner Charles Ramsey said the two men have a history. He said they know each other, there was an argument, and one of them allegedly produced a gun.
A spokesperson for the community college says a text alert was sent out notifying students of the incident, and ordering those on campus to shelter in place.
Masterman High School, located just across the street from the college, was also placed on lockdown as a precaution.
This comes just one day after an online post threatened an attack at a college or university in the Philadelphia area. There is no indication, however, that the incidents are connected.
And it was last May when the Community College of Philadelphia was last placed on lockdown after a student flashed a weapon during a dispute in a chemistry class.