The 14- year-old boys are charged with fourth-degree arson.
The annex of the George Washington Elementary School in West Hempstead went up in flames Monday night.
The school superintendent, John Hogan, suffered a heart attack at the scene, but is said to be alert and resting in the hospital.
The school is set to open in September.