Alasdair Evans, Michael Leask and Gavin Main each took two wickets for the hosts in Edinburgh - the latter for the loss of only nine runs - as Namibia finished their 20 overs on 127 for eight.
George Munsey got Scotland off the mark with a four but was then bowled before adding to his score and both Craig Wallace (14) and Leask (six) were gone before the end of the fourth over.
But Richie Berrington (61 not out) swept Scotland to victory with the help of Kyle Coetzer (28) and Preston Mommsen (15 not out).
Berrington struck four sixes to take Scotland to 130 for four in the 17th over at the Grange.
Co-hosts Scotland complete their warm-up for the qualifiers for next year’s tournament in India when they face Jersey on Tuesday.