Chasing a target of 141 at the Al Amerat ground in Muscat on Sunday, Bangladesh got off to a torrid start, losing openers Liton Das and Soumya Sarkar within 4 overs.
As Greaves claimed the wickets of Shakib Al Hasan (20 off 28) and Mushfiqur Rahim (38 off 36) in successive overs, the Tigers were reeling at 74 for 4 in the 14th over.
After the fall of Afif Hossain (18 off 12), captain Mahmudullah (23 off 22) and Nurul Hasan were both caught at the boundary, trying to hit sixes as the gap between runs needed and balls remaining widened further.
Needing 25 runs off the last over for an unlikely win, Mahedi Hasan and Mohammad Saifuddin managed to add 17 runs with a six and two boundaries, but the Tigers ended with a score of 134 for 7.
Earlier, after being put in to bat first, Scotland were on the ropes after losing 6 wickets for 53 as Mahedi and Shakib spun webs around their batting line-up.
Mahedi took 3 wickets while Shakib claimed two to become the leading wicket-taker in T20Is with 107.
But Greaves, aided by Mark Watt (22 off 17), scored 45 runs off 28 balls to pull the Scotts out of the mire and give their bowlers something to fight for.
And, the total eventually proved to be enough to beat the No. 6 ranked Bangladesh, who recently crushed the likes of Australia and New Zealand in the shortest format recently.
Brief scores: Scotland 140/9 in 20 overs (Chris Greaves 45, George Munsey 29; Mahedi Hasan 3-19, Shakib Al Hasan 2-17) beat Bangladesh 134/7 in 20 overs (Mushfiqur Rahim 38; Bradley Wheal 3-24, Chris Greaves 2-19) by 6 runs.