Taliban insurgents appear to be gaining ground and a government formed after last year's messy election is still mired in disputes, news agency reported.
"I started shooting them one by one. I counted six of them lying there. The last one (seventh) was killed by someone else, "said Essa Khan while narrating the attack.
The 28-year-old even met President Ashraf Ghani, who called him a "brave son of this nation" and handed him the keys to a new apartment as a reward.
President Ghani termed him "brave son of this nation".
President has also handed him the keys to a new apartment as a reward.
The Afghan army has long been popular in a country where the majority of people oppose the Taliban and its violent methods.
The Taliban has made territorial gains and launched a series of deadly attacks across the country since announcing a summer offensive, leaving Afghan forces facing their biggest test since NATO combat troops withdrew from the country at the end of 2014.
One woman and a child were killed and 30 others wounded in the attack, though the assailants did not manage to enter the parliamentary compound itself, in part thanks to Khan's quick thinking.