The fire swept through a nursing home inside the hospital in Tainan City that housed elderly and mostly bed-ridden patients.
A hospital official said the victims died of smoke inhalation. Injured residents were being treated at several different hospitals.
Police say they have arrested a man on suspicion of starting the fire.
Local reports say the man is a patient at the nursing home.
The nursing home housed more than 100 people, many of whom were on respirators and unable to move on their own.
Thirty fire engines were sent to the blaze, which was extinguished by 04:16 local time (20:16 GMT), just over 45 minutes after it was reported, officials said.
Tainan Mayor Lai Ching-te said the hospital’s remote location and the fact that most of the patients were unable to move on their own made the situation worse.
Firefighters arrived at the scene 10 minutes after the fire broke out, but because of the large number of patients nearby residents had to pitch in to help transport some of them to other hospitals, says the BBC’s Cindy Sui in Taipei.
The fire is believed to be one of deadliest at a Taiwanese hospital and one of the most serious on the island in recent years, says our correspondent.