Resuming at its overnight score of 144 for nine, still six runs behind Afghanistan, Scotland captain Gordon Drummond and Safyaan Sharif could play out just one over.
Drummond was the last man out off the sixth ball of the third day, as he was clean bowled by Dawlat Zadran.
Drummond became the fourth victim of Zadran who ended with figures of four for 51.
The day before Izzatullah Dawlatzai, who took six wickets in the first innings, was once again Afghanistan's hero.
The 21-year-old fast bowler grabbed five more wickets on Wednesday and could have ended the game with six had Dawlat Zadran held on to a catch at long leg off of a pull shot from Drummond.
Dawlatzai was on a hat-trick twice in the second innings and has already taken a match best career best 11 for 94.
Kabir Khan, the Afghanistan coach, felt leaving the youngster out of the two Twenty20 and the 50-over matches against Scotland had stirred his appetite.
"It has been a long wait for him as he didn't get an opportunity to play in the shorter formats. He got hungrier when given the opportunity to play," Kabir said. "He was a bit frustrated when he wasn't picked for the shorter formats ... He has bowled brilliantly throughout this match and his performance now makes us think of trying him out in all formats." He told UAE based Newspaper, The National
"I just concentrated on a good line and length," Dawlatzai said.
"There was a strong breeze and I got some movement off it as well as the pitch. I am really pleased that I could deliver for my team." he added.
Afghanistan now has three wins from five matches and is now second on the points table behind Ireland who managed a draw against UAE in Sharjah.