It said the dead included 38 civilians, 10 Afghan soldiers and two police. It said the 11 "terrorists" who took part in the assault were killed, and that the fighting ended late yesterday.
Afghan forces have struggled to roll back Taliban advances since the US and NATO formally concluded their combat mission at the end of last year.
The sprawling airport, known as Kandahar Air Field, has a military and a civilian section, as well as a NATO base. There were no coalition casualties.
Gen. Rahmatullah Nabil said he did not agree with the president's policies in recent months, without providing further details. The four-star general had served as head of the National Directorate of Security for five years.
Ghani said in a statement that he accepted Nabil's resignation and would replace him with someone from within NDS.
