The quakes destroyed an estimated 100 houses in two villages in Nangarhar province, said governor's spokesman Ahmad Zia Abdulzai.
The provincial police chief, Ghafor Khan, said at least 19 people were killed and 20 injured.
One villager said the death toll was considerably higher. Officials were travelling to the site.
The US Geological Survey said Nangarhar province was hit by two earthquakes - a 5.5 magnitude quake at about 2am, and a 5.1 magnitude aftershock two hours later.
Khan said two villages suffered the most damage - Sargad Kheil and Khodi Kheil, both in Sherzad district, about 90km east of Kabul.
A villager in Sherzad, Shah Mohammad Khan, said that 40 people were killed and 60 wounded, but government officials did not confirm those figures.
Afghanistan's Hindu Kush mountain range is hit by dozens of minor earthquakes each year.
Many Afghan homes are made of dried mud, so even moderate earthquakes can cause many deaths and major damage to infrastructure.