The natural disaster was felt across Taiwan, and some buildings and roads in Hualien, in eastern Taiwan, were damaged.
"We know there are people who are trapped inside - we can see lights inside the hotel", eyewitness Zeena Starbuck told the BBC.
Taiwan's Central News Agency reported that the ground floor of the Marshal Hotel in Hualien county had caved in, causing the deaths of the two employees.
Another building called the Beautiful Life Hotel is also tilting.
A U.S. Geological Survey Twitter account recorded the quake at 9:50 p.m. local time.
Global Investrs Summit focuses on Economic ties with ASEAN & BBN
Indian Oil Corporation (IOC) and Numaligarh Refinery Ltd planning to invest Rs3,432 crore and Rs3,410 crore, respectively. It offers power at Rs 2.23 per unit.
The lower basement and ground floor of the 10-storey Marshal Hotel have given way.
Hsu Kuo-Yung said the railway department hasn't given a full status report of the damage yet but he said it seems the railways have not been damaged much. Tremors were also felt in far-off cities, local media reported.
Two bridges in Hualien City were damaged and sealed off from the public.
Earthquakes are a fairly common occurrence in Taiwan, which sits on the boundary of two tectonic plates - the Philippine Sea Plate to the East and the Eurasian Plate.
The BBC reports two confirmed dead and at least 100 injuries.
Don Blakeman, a geophysicist at the National Earthquake Information Center, says the temblors have continued into the early morning hours on Wednesday.
The quake follows a 6.1 magnitude quake off the coast of Hualien on the east of Taiwan, which lies along the Pacific Rim of Fire.