The injured boy, also 15, was treated by paramedics at Worle Community School in Weston-super-Mare after police were called at about 13:45 GMT.
Avon and Somerset Police said he was taken to hospital but was not thought to be in a life-threatening condition.
The two boys arrested on suspicion of causing grievous bodily harm remain in custody, the force said.
Detectives said the incident had "involved a small number of pupils at the school" and there was no risk to "anyone else at the school or the local community".
They asked anyone with information to contact them.
A statement posted on the school's website said: "There was an incident at lunchtime resulting in a student being injured. There is no ongoing risk to anyone at the school."
Two 15-year-old schoolboys have been arrested after another pupil was injured at a school.