Mulyadi, deputy district chief of Pidie Jaya, said, "Eighteen have died so far, based on data from the hospital. Some of the fatalities are children."
The US Geological Survey (USGS) said that the strong earthquake of 6.5-magnitude hit just north of the small town of Reuleuet. There was no tsunami alert.
The quake struck at dawn, as some in the predominantly Muslim region prepared for morning prayers, local officials said.
Deputy district chief said that seven children were among the dead, with a local hospital overwhelmed by the number of people arriving with injuries.
He said "The hospital here couldn´t take the patients, so we sent some to the neighbouring district."
Mosques, homes and shops were flattened in the quake , with images from the worst-hit areas showing significant damage.
The local disaster management agency said rescue efforts were under way to save those trapped beneath collapsed buildings.
Local agency head Puteh Manaf said, "Some people are still trapped inside shop and houses, and we are trying to evacuate them using heavy machines and by hand."
Seismologists said the earthquake was felt across much of Aceh province, which was devastated by the 2004 Indian Ocean tsunami.
Eridawati, the local head of the Meteorology, Climatology and Geophysics Agency said that at least five aftershocks followed the quake .
The USGS upgraded the magnitude to 6.5 from an initial reading of 6.4 and issued a yellow alert for expected fatalities and damage.
In the coastal town of Sigli, people panicked and fled their houses to seek shelter away from the sea. Indonesia experiences frequent seismic and volcanic activity due to its position on the Pacific "Ring of Fire", where tectonic plates collide.
Aceh lies on the northern tip of Sumatra Island, which is particularly prone to quakes.