The students began "feeling unwell" at Llanwern High School, in Newport, at about 11.40 BST on Thursday.
One 14-year-old girl, five girls aged 13, two girls aged 12 and an 11-year-old boy were taken to Royal Gwent Hospital.
Laboratory tests are under way to determine what the substance was.
Police said not all the pupils required hospital treatment but were taken as a precaution. Eight of the nine have now been discharged.
Gwent Police said inquiries were ongoing to find out the exact circumstances of what happened and where the substance was obtained.
The Welsh Ambulance Service sent three rapid response cars, three emergency ambulances and an urgent care service vehicle to the school.
A council spokesman said on Thursday: "Our immediate priority is the well-being of the pupils affected.
"The school will be carrying out an investigation and will be working with the police into how this incident happened."
A 14-year-old girl remains in hospital after nine pupils were taken ill at school after reportedly taking an unknown substance.