Arsonists targeted the former Grenoside Primary School building last night.
They struck at the derelict site in Norfolk Hill, Grenoside, at about 7.40pm.
A South Yorkshire Fire and Rescue spokeswoman said: "They had set fire to a pile of litter inside the building.
"The blaze was contained and did not spread. There was only small damage caused inside."
Crews from Tankersley and Elm Lane stations spent about 30 minutes tackling the blaze.
The Victorian-era classrooms have not been in use as a school since the primary moved into a modern building about 10 years ago.
Later the same night arsonists set fire to two wheelie bins in Garden Street, Mexborough in Doncaster, at about 10.15pm.
Firefighters from Dearne Station spent 20 minutes at the scene.
Arsonists also set fire to a car in Crown Close, Worsbrough Common in Barnsley, at 1.40am this morning. Barnsley Central firefighters spent an hour tackling the blaze.