The boy was said to be in a comfortable condition at the Royal Halifax Infirmary after the incident at Holy Trinity Senior School in the Holmfield area of the town.
A West Yorkshire police spokesman said another 17-year-old had been arrested and was being questioned in connection with the incident.
Terry Cobb, a senior teacher at Holy Trinity, said: "The head and the chair of governors are investigating the incident and at this point there is no further comment."
Head teacher Philip Williamson confirmed that the incident was being investigated and said the injured boy's parents had been informed.
He said the wound was superficial and the boy was in no danger.Reuse content