The fire at Hillside Endarasha Primary school in Nyeri, north of the capital Nairobi, broke out during the night against Friday. In the dormitory where the fire occurred, there were over 150 boys between 9 and 13 years old.
Isaac Mwaura, government spokesperson, says that 19 boys were found dead at the scene of the fire. Two more have died in hospital from their injuries.
Several were injured in the fire and some children are still missing.
The autopsies of the deceased will begin on Tuesday. The bodies found are severely burned.
The cause of the fire is not known. Renson Ingonga, head of the prosecution authority, says that if it is found to have been caused by, for example, negligence, those responsible will be brought to justice.
On Saturday, a fire also occurred at a girls' school, about 14 miles northeast of Nyeri. According to the police, the fire is under control. No fatalities have been reported.
School fires are common in Kenya's many boarding schools.