The victims were boys and girls aged between seven and 13, police spokesman Patrick Onyango said.
The Islamic East Kabarole Primary School had been using candles due to a power crisis that has caused blackouts across the country.
''It seems one pupil left a candle and it caught a bed sheet before spreading from there,'' Onyango said.
''Of course, because they were small children, they couldn't know what to do put it out.'' Fatal fires are common in east Africa, where few buildings have extinguishers and most communities lack firefighters.
Witnesses in Fort Portal said volunteers rushed to the school with cans full of water in the early hours today morning, but were unable to save the victims.
The town is 320 km west of the capital Kampala, near the border with Democratic Republic of Congo.
REUTERS SY HS1532