Butler County Sheriff Richard Jones says two other students were injured either as they tried to get away or from shrapnel.
Jones says the suspect ran from the school, threw the gun down and was apprehended nearby.
Jones is not giving details on the shooting's motive. Investigators say the students who were shot were 14 and 15 years old and were taken to the hospital.
The school has said none of injuries is believed to be life-threatening.