District Attorney Larry Krasner says 32-year-old Heriberto Acevedo Jr. is charged with aggravated assault following the incident on July 14 in the city's Feltonville section.
Investigators say he threatened a Route 57 bus driver after being asked to pay the fare upon boarding.
Acevedo Jr. then got off and fired a shot at the bus, authorities said.
The bullet hit the windshield. SEPTA says no injuries were reported.
Acevedo Jr. was arrested by police on August 8.
"My office will continue to work collaboratively with SEPTA and SEPTA Police to improve safety on mass transit -- a vital public good on which prosecutors, staff, jurors, witnesses, and defendants throughout the criminal legal system depend," said Krasner in a statement.
RELATED: Check the 6abc Neighborhood Safety Tracker