Chasing 146 for victory, Bangladesh required nine in the 20th over but Khan held his nerve to restrict Bangladesh to 144-6 in the north Indian city of Dehradun.
The Asghar Stanikzai-led Afghanistan, who await their Test debut against India on June 14 in Bangalore, triumphed 3-0 after winning the first two games comprehensively.
Mushfiqur Rahim, who hit 46, and Mahmudullah Riyad, who made 45, put together a gritty 84-run fifth-wicket partnership to give Bangladesh hope of a consolation win.
Mushfiqur, who was named man of the match, smashed five fours in the penultimate over but fell to Khan s leg spin on the first delivery of the final over.
Mahmudullah tried to get four off the final ball but Shafiqullah Shafiq s acrobatic work at the long-on boundary got the batsman run out in a dramatic finish to the game.
The 19-year-old Khan, who topped the bowling chart with eight wickets and the man of the series award, returned figures of 1-24.
Earlier Afghanistan batsman Samiullah Shenwari made an unbeaten 33 to lift his side to 145-6 after they elected to bat first.
Afghanistan were in trouble at 101-4 in the 15th over against a disciplined Bangladesh bowling attack but Shenwari s 28-ball knock gave them a winning total.
Opening batsman Mohammad Shahzad and Stanikzai also made useful contributions of 26 and 27 respectively.
Left-arm spinner Nazmul Islam and paceman Abu Jayed claimed two wickets each.