All the children managed to escape unhurt before the bus was engulfed in flames on Wednesday.
Italian police said the driver was an Italian of Senegalese origin.
"He shouted 'stop the deaths at sea, I'll carry out a massacre'," spokesman Marco Palmieri quoted the driver as telling police after his arrest.
A video posted on Italian news sites showed the driver ramming the bus into cars on a provincial highway before the fire took hold.
Children can be seen running away from the vehicle screaming and shouting "escape".
One of the children told reporters that the driver had threatened to pour petrol on them and set them alight.
One of the group called police, who rushed to the scene and managed to get everyone to safety.
Palmieri said some children were taken to hospital as a precautionary measure because they had bruises or were in a state of shock, but none suffered serious injuries.
The United Nations estimates that some 2297 migrants drowned or went missing in the Mediterranean in 2018 as they tried to reach Europe.