The cadets will be the first Afghans to attend the Pakistan Military Academy in Abbottabad.
The move is a policy shift by the Afghan govt who until recently sent Afghan cadets to get trained mostly in India.
Janan Mosazai, Afghanistan's ambassador to Pakistan, called the 18-month stint "an important step".
Afghan President Ashraf Ghani, who was elected in September, recently held talks with Pakistani officials in the hope of greater cooperation between their two militaries.
Read more: Offer to train Afghan troops renewed
His predecessor, Hamid Karzai, routinely criticised Pakistan for allegedly sheltering militant groups.
Pakistan always rejected such complaints and accused Afghanistan of failing to stop cross-border attacks.
Since Taliban militants attacked a school in Peshawar, killing more than 150 people in December, military chiefs of Afghanistan and Pakistan have agreed to co-ordinate military operations along their border.
Pakistan first offered training to Afghan security forces in 2010 at a North Atlantic Treaty Organisation conference in Brussels.
The proposal was aimed at bridging trust deficit between the two countries.
Three years later an Afghan defence delegation led by defence minister Bismillah Muhammadi visited Pakistan in 2013 for inspecting Pakistani training facilities.
The Afghan delegation’s visit was then seen as a paradigm shift in Afghanistan’s perceptions about Pakistan.