Mohammed Nabi celebrates after taking a wicket. File
Nabi discussed the decision in a video statement released by the Afghanistan Cricket Board.
"I have served Afghanistan for the last 18 years. It was my dream as well to help Afghanistan obtain Test status and that dream is realised now," he said.
The 34-year-old all-rounder said he would like emerging young players get chances in the long-format of the sport instead of him
"I want them to get the chance they deserve so that we have a good Test team in the future as well."
Nabi has been a key part of Afghanistan's rise in world cricket, featuring in 121 one-day internationals and 68 Twenty20 internationals.
The Afghan also played in his country's two previous Test matches, helping his side record their maiden wins against Ireland in Dehradun in March.
His contribution in the ongoing Test is limited to so far scoring eight runs in two innings and picking three wickets giving away 56 runs after the third day of action.
Afghanistan are leading Bangladesh by 374 by after scoring 342 and 237-8 in two of their innings and bowling the home side out for 205 in between.
Nabi confirmed he will continue to represent his nation in the shorter formats.
"I will strive to play ODIs and T20Is for Afghanistan as long as I am able to," he said.
Shah made 102 and put on a crucial 120-run fourth-wicket stand with Asghar Afghan, batting on 88, to counter the Bangladesh spin attack at the Zahur Ahmed Chowdhury Stadium in Chittagong.
Rashid Khan claimed 6-49 and completed his maiden 10-wicket haul in Test cricket as Afghanistan overcame rain and fading light to crush Bangladesh by 224 runs in the one-off Test in Chittagong on Monday.
Out-of-form opener Lokesh Rahul has been excluded while rookie Shubman Gill has received his maiden call-up for three-Test series against South Africa starting Oct.2.
Nabi hit an unbeaten 84 off 54 balls under pressure to guide Afghanistan to 164-6 before Mujeeb claimed a career best 4-15 to help his side dismiss Bangladesh for 139 in 19.5 overs for their world record 12 successive Twenty20 international win.
After restricting West Indies to a paltry total of 55, England chased down the target for the loss of just four wickets in 8.2 overs.
India and Pakistan are set to renew rivalry in a spine-tingling and the most anticipated clash of the T20 World Cup in Dubai on Sunday.
Namibia reached the Twenty20 World Cup second round for the first time on Friday when they defeated Ireland by eight wickets.World number 19 Namibia, the lowest-ranked team in the tournament, chased down their modest target of 126 with skipper Gerhard Erasmus making an unbeaten 53.