There were no immediate reports of casualties, but Taiwanese television showed images of school children being evacuated, with one multi-story building in the capital reported to be leaning against its neighbour.
Footage also showed at least one landslide along the mountainous and lightly populated east coast after the quake hit six miles north west of Hualien around 1pm local time.
Two tourists were injured while walking in Hualien County, including one who has been pinned under some rocks, according to Taiwanese media. Rescue workers are still attempting to free the Malaysian man.
While small-scale power cuts were reported in some districts in Taipei, oil refinery plants and services were operating as normal, according to the government.
A Central Weather Bureau official said it was the largest quake on the island so far this year, hitting at a depth of 11 miles. The US Geological Survey put the magnitude of the quake at 6.4.
The central government said it had set up a disaster reaction centre, while subway services in the capital were temporarily suspending.
President Tsai Ing-wen said high-speed rail service in northern Taiwan, between Taipei and the neighbouring city of Taoyuan, had also been temporarily suspended.
On her official Facebook page, Tsai said she asked officials “to gather information from everywhere to check whether there's any damage, and if so, to react as soon as possible”.
A crowd at Taipai’s Chiang Kai-Shek Memorial Park were filmed being evacuated from the site after the quake hit.
At the leaning building in downtown Taipei, resident Ayumi Lin said the force of the quake was felt strongly. “It was really scary,” said Ms Lin, 50. “The quake shook strongly twice.”
People in Chinese cities close to the Taiwan Strait dividing the island from mainland China reported on social media that they felt the quake.
Taiwan, a self-ruled island that China considers part of its own territory, lies near the junction of two tectonic plates and is prone to earthquakes.
An earthquake in February 2018 in Hualien killed 17 people when four buildings partially collapsed. That quake hit two years to the day after an apartment building in the south-west city of Tainan collapsed in an earthquake, killing 115 people.
Additional reporting by agencies
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies