Donte Walker, 18, allegedly sold the gun that was fired inside the gymnasium of the Delaware Valley Charter School on Friday.
The accused shooter, Raisheem Rochwell, 17, obtained the firearm from Walker just before the shooting, police said.
Walker turned himself in to police on Saturday.
Rochwell was reportedly going to be the target of an assault after school and may have requested the gun, according to police.
Video footage shows the exchange of money and a black handgun between Walker and an unidentified male, police said. The gun was then handed to Rochwell inside the gymnasium, police said.
According to investigators, Walker, a former student who graduated in 2013, was considered a "guest" and did not have to pass the metal detectors to enter.
Walker is being charged with violation of Pennsylvania's Uniform Firearms Act, conspiracy and related offenses.
Rochwell was arraigned Saturday as an adult. He faces charges including aggravated assault, violation of the Uniform Firearms Act, recklessly endangering another person and having a weapon on school property, according to police.
The shooter was in the school gym with about seven other students, city police Commissioner Charles Ramsey said. Some were playing basketball and others were standing in a corner when the shooter pulled a gun and fired.
Around 3:30 p.m. the gun went off, striking an 18-year-old female student and a 17-year-old male student, police said. She was struck in the rear of the left arm, the bullet perforated her bicep and struck the boy in the shoulder. The students were taken to a local hospital Friday and have since been released.
The investigation is ongoing. A 16-year-old male student had been in custody in connection with the shooting but was released because no charges were approved, police said.