A total of 160 people were evacuated from the Hospital 17 drug rehabilitation unit in southern Moscow, Irina Andrianova, a ministry spokeswoman, told the ITAR-TASS news agency on Saturday.
All of the 42 dead were women.
Yuri Nenashev, Russia's chief fire inspector, said he was "90 percent certain" that the fire was caused by arson, but Moscow city prosecutor Yuri Syomin said investigators were looking into other possibilities.
Investigators believe the fire started at one end of a corridor on the second floor.
Rescue operations were made more difficult as the drug rehabilitation unit's windows were barred and an exit at one end of the building was locked, Russian officials said.
Güncelleme Tarihi: 20 Eylül 2018, 18:16
Yevgeny Bobylyov, a spokesman for the city fire department, said the victims died of asphyxiation. Ten other people were hospitalised for carbon monoxide poisoning.
ITAR-Tass said that the area of the fire was comparatively small, about 100 square meters, but that people had died from the heavy concentration of smoke.
Bobylyov said that the first call to the fire department, which was made at 1.30 am (22.30 GMT Saturday), had come very late.
He said: "The hospital personnel worked very badly, they did not take steps to evacuate people in the early stages of the fire."
He said firefighters put out the fire within an hour of the first call for help.
Firefighters used 20 fire engines to extinguish the fire in a two-hour operation.
News agencies reported that two hospital staff members were among the dead but there were differences in the number of casualties reported.
The fire was reported as the worst fire to break out in Moscow in three years.