The Wimbledon champion and No.2 seed struggled with his first serve throughout but won 72% of points on his second serve. He converted only three of the nine break-point opportunities he mustered, but that proved enough.
Murray struggled in the early stages of his first-round match against Pablo Andujar and it was a similar story against Sousa as he found himself an immediate break down at the start of the first set.
The 26-year-old wasted two points for an instant break back, but got on the board in his next service game and then earned two more break points, finally converting at the fourth attempt with a flat cross-court forehand for 2-2.
Murray appeared to have broken again for 4-2 but, in a bizarre incident, the Scot challenged when he thought his shot had been called out - it had not - and appeared to be punished for verbal interference, with the point given to Sousa, who went on to level at 3-3. That seemed to spur Murray on, though, as he broke at the next opportunity and served out to take the set.
Errors by the Portuguese gave Murray an early breakthrough in the second set. It then progressed on serve but Sousa was hanging on on his own delivery, facing deuce or break points in every game, and Murray served out in game 10, capitalising on his second match point.
Elsewhere, Novak Djokovic advanced to the semi-finals of the Dubai Duty Free Championships without hitting a ball. Djokovic will face Roger Federer for a place in the final after the Swiss beat the Czech Lukas Rosol 6-2, 6-2.
Germany's Philipp Kohlschreiber will play Tomas Berdych in the other semi-final. Kohlschreiber recorded the 300th match win of his career by beating the Tunisian wild card Malek Jaziri 6-2, 6-3, while Berdych defeated Jo-Wilfried Tsonga 6-4, 6-3.
"It's always great to win, especially a few rounds in a row," Kohlschreiber said. "It's great that I have 300 victories under my belt."