The deaths are likely to worsen already fraught relations between the US-led NATO coalition and President Hamid Karzai, who has often seized on botched airstrikes to launch bitter criticism of the international military effort in Afghanistan.
"At 3:30 am this morning, due to a NATO airstrike in Charkh district, Logar province, five service members of the Afghan national army were martyred and eight others were wounded," defence ministry spokesman Zahir Azimi said on his Twitter account.
"The post is totally destroyed," he said. "The Americans used to be in that post but since they left, the ANA (Afghan army) took over. The post is on a hilltop. The attack was conducted by drones."
President Karzai, who is due to stand down after elections on April 5, in an interview this week expressed his "extreme anger" towards the United States as it prepares to end its 13-year war in Afghanistan.