It is understood that the doors to the dormitory were locked from the outside.
The children, aged between 7 and 10 had been sleeping at the time.
Hundreds of parents arrived at the school, which has around 1,000 students, to search for their children.
"Help me, oh God please help me," Jacqueline Bakoba cried as she lifted up part of the collapsed roof looking for her missing daughter.
It was the third deadly fire at a school in Uganda in two years.