Chasing 191, Scotland raced to 27 in three overs but Afghan right-arm off-break bowler Mujeeb pegged them back in the UAE's Sharjah in Super 12 game at the T20 World Cup Monday.
Kyle Coetzer was the first to go, bowled through the gate with a googly. On the next ball, he trapped Calum MacLeod lbw with yet another googly.
Richie Berrington survived the hat-trick ball but he lasted only two more balls as Mujeeb's googly snared him as well.
READ: Youth ODI Series: Hosts Sri Lanka whitewash Bangladesh 5-0
Earlier, Afghanistan won the toss and elected to bat in their opening Super 12 game against in-form Scotland. They finished with 190 for 4.
Najibullah was the top scorer with 59 off 34 balls and was out on the last ball of the innings. Nabi smashed 11* off four balls towards the end as Afghanistan ransacked 63 from the last five overs.
Scotland was on a high after upsetting Bangladesh in the qualifiers before beating Papua New Guinea and co-host Oman to advance.
Experienced Mohammad Nabi is leading Afghanistan, which has played just three T20s since March last year but he said victory against West Indies in a warm-up game was "really good."
Nabi was named captain after Rashid Khan stepped down minutes after Afghanistan's squad was announced, saying the selectors were not consulting him.
READ: Afghanistan wins toss, elects to bat against Scotland
Scotland skipper Kyle Coetzer said he was happy to bowl first.
Pakistan, which crushed arch-rival India by 10 wickets on Sunday, New Zealand and Namibia are the other teams in the group.