The U.S. Geological Survey said the earthquake struck at 8:02 p.m. and measured magnitude 6.3. It was centered in a remote mountainous area 45 kilometers (28 miles) south-southwest of the coastal city of Hualian at a depth of just 12 kilometers (7.5 miles), it said.
In the capital, Taipei, about 150 kilometers (95 miles) from the epicenter, buildings swayed for more than 10 seconds and startled residents ducked for cover.
Taiwan's railway administration immediately suspended train service while it checked for any possible damage to tracks.
Authorities reported scattered power outages in northern Taiwan. In at least two locations in the Taipei suburbs crews were working to extricate people trapped in stalled elevators.
Local TV channels reported that there appeared to be almost no damage in Hualian. However, it could take some time for the full impact of the quake to be evaluated because of the remoteness of the epicenter.
Newer buildings in Taiwan are built to withstand strong earthquakes, so damage in major cities tends to be limited. This is not the case for buildings constructed before the 1980s, when construction standards were less rigorous.
Earthquakes frequently rattle Taiwan, but most are minor and cause little or no damage.
However, a magnitude-7.6 earthquake in central Taiwan in 1999 killed more than 2,300 people.