World number 11 Murray opened up a 3-0 lead before collapsing as his opponent reeled off nine of the next 10 games to take the first set and go 3-1 up in the second.
The Scot, who also beat Wawrinka in last month's Qatar Open final, hit back to level before snatching the tiebreak 7-5 with an ace and cruising through the deciding set.
"I felt fine at first but then I started to struggle to keep the ball in court," fourth seed Murray told reporters.
"Everybody knows Stan can get nervous when a match gets tight. I know him well because he's one of my best friends on the tour."
Murray was knocked out in the first round of last month's Australian Open before a knee injury forced him to withdraw from the Davis Cup tie with Argentina.
He next meets Frenchman Nicolas Mahut. The pair have met once before, last year in Indian Wells, and Murray won 6-1, 6-3.
More from rediff