Chasing 183 for victory, Scotland were 132-5 after 16 overs before Shepherd bowled a four-wicket over running through the lower order.
After conceding one run with the first ball of the over, Shepherd had Matthew Cross caught at point and Michael Leask snared near long-on before the bowler went on to hit the top of Oliver Davidson's off-stump to complete his second hat-trick in T20 Internationals.
Next man in Safyaan Sharif survived the next delivery but fell immediately offering a skier to Jason Holder at mid-off.
Scotland, who entered the tournament after Bangladesh refused to tour India citing safety concerns, were all out for 147 in 18.5 overs.
Shepherd finished with figures of 5-20, while Holder claimed 3-30.
Put into bat, West Indies earlier posted 182-5 with Shimron Hetmyer (64) providing the bedrock with a 36-ball knock that included six sixes.
"That was phenomenal. I think he was going to get it to be honest," Hetmyer said of Shepherd while showing his player-of-the-match medal.
"It's not often you see a guy get five (wickets) and a hat-trick."
