North Yorkshire Police said the boys inhaled a substance when they were with a group of youths on a field at Stockwell Community Centre in Knaresborough on Sunday night.
They were taken to hospital for treatment and released on the same day.
The headteacher of their school has now written to parents warning them of the potential dangers of “smoking or experimenting with unpredictable substances.”
In the letter Carl Sugden, the headteacher of King James’s School, in Knaresborough, said: “It has come to our attention that over the weekend some of our students were taken to hospital as a result of smoking/inhaling e-cigarettes (“shisha/hookah pens, vape pens”).
“The inhalant they had appears to have been spiked with an as yet unknown substance.
“The police are involved in this matter and investigations are continuing external to school.
“Although this happened outside of school, at the weekend when students were not in our care, we are writing to urge you to speak with your children about the above and once again re-iterate the dangers of smoking or experimenting with unpredictable substances.
“We will be speaking about this in assemblies over the next two weeks.
“If anyone, student or parent, has information which can help the police and ensure that no more of our young people come into contact with this substance we would appreciate you telephoning the school and speaking with us.”
Police said that three teenagers have been arrested in connection with the incident.
A 12-year-old girl and a 13-year-old boy, both from Harrogate, and a 14-year-old boy from Knaresborough have all been released on bail pending further enquiries.