The 6.2-magnitude earthquake struck on Friday morning, just hours after an earlier, smaller tremor.
Hundreds of people were injured and thousands displaced by the quake.
Indonesia has a history of devastating earthquakes and tsunamis, with more than 2,000 killed in a 2018 Sulawesi quake.
Eight people died when the five-storey Mitra Manakarra Hospital in Mamuju partially collapsed on Friday, officials said. About 60 people were safely evacuated from the hospital.
"It happened so quickly, around 10 seconds," Syamsu Ridwan, a local police spokesman, told the BBC. He said the power in the hospital cut out during the earthquake.
Officials fear the death toll will increase as rescue efforts continue. Rescuers were still searching for survivors late on Friday, but they have been hampered by power cuts and poor mobile phone service.
Indonesian President Joko Widodo offered condolences to the victims, urging people to stay calm and for the authorities to step up search efforts.