Images on local television showed the Marshal Hotel in Hualien slanted on its side, partially crumpled into the ground.
Media reports said there were 30 people trapped inside with others crawling to safety.
The fire agency said a second hotel had also been damaged, with televison images showing roads strewn with rubble and cracks in highways.
The quake hit at 23:50 pm (1550 GMT) around 21 kilometres (13 miles) northeast of the port city Hualien, according to the United States Geological Survey.
It follows almost 100 smaller tremors to have hit the area in the last three days.
The quake comes almost exactly two years since a quake of the same magnitude…