The quake measured magnitude 5.3 and was centered about 32 kilometers southwest of Reuleuet in Aceh province at a depth of 48 kilometers, the US Geological Survey said.
A 90-year-old man suffered a heart attack as he was fleeing with other residents of Tangse village in Pidie district, National Disaster Mitigation Agency spokesman Sutopo Purwo Nugroho said.
He said two other villagers were rushed to a hospital with head injuries and broken bones after about 160 houses and two mosques were badly damaged.
The quake was felt across many parts of Aceh province, including the capital, Banda Aceh. Residents ran from their houses and many remained outside, fearing aftershocks.
Indonesia, a vast island nation of 240 million people, is prone to seismic upheaval due to its location on the Pacific "Ring of Fire," an arc of volcanoes and fault lines encircling the Pacific Basin.
A massive quake off the coast of Aceh in 2004 caused a powerful tsunami that killed around 230,000 people in a dozen countries.