The blaze began before dawn at the camp housing about 600 migrants in Ouargla, 800 kilometres southeast of Algiers.
The victims' nationalities were not immediately known.
"The fire broke out at 3:00 AM (0730 IST), killing 18 people and wounding 43," Colonel Farouk Achour said by telephone.
The president of the Algerian Red Crescent, Saida Benhabiles, said the fire was sparked by a short circuit.
"A short circuit triggered the explosion of a heater and the fire," Benhabiles told AFP.
More From This Section
The emergency services rushed to the scene to extinguish the fire.
The authorities have opened an investigation.
Since Libya descended into chaos in its 2011 uprising, Algeria has become a top North African destination for sub-Saharans seeking a better life.
Benhabiles said that more than 4,000 migrants from Niger have been returned to their country by Algeria since 2014.
She said that 400 more migrants were due to be sent back to Niger from Ouargla, but it was not clear if any of them were from the camp hit by the blaze.
"They are constantly on the move. One day there could be 2,000 (migrants) and the next they are 200," she said.
"We don't lock up people as they do elsewhere.