The Briton was unaware throughout the 158-minute contest that Nigel Sears, the coach of Serbian Ana Ivanovic and father of his expectant wife Kim, had collapsed in the stands on Rod Laver Arena.
The 28-year-old performed his normal victory celebrations after reaching the last 16 for the eighth straight year but was ushered off without the usual on-court post-match interview.
Murray had previously said he would pull out of the tournament and return to Britain to be with his wife should she go into labour with their first child, due in mid-February.
The Scot, who had never lost to the Portuguese in six previous meetings, broke twice to win the first set fairly easily, finding the lines with his winners and matching Sousa’s pace around the court.
Sousa, though, believed he was in the form of his life after practising with Rafa Nadal over the close season and was out to prove it.
He broke Murray’s first service game of the second set and kept up the pressure with ferocious groundstrokes to force the second seed to drop his first set of the tournament.
“At the beginning I think he was extremely aggressive, very intense,” Murray, who did not hold a post-match news conference, said in a statement to the ATP.
“So he was getting into position to dictate a lot of points with his forehand.
“He was hitting the ball great, close to the lines, and
making me do a lot of running.”
Murray wrested back the momentum by breaking his opponent at the start of the third, however, and once he had gone 2-1 up a hard-fought victory always looked on the cards.
“Once I started to hit the ball a little bit cleaner towards the end of the match I was able to get him in his backhand corner and dictate more of the points,” Murray added. “It was tricky. I didn’t feel great.
“I just tried to keep fighting. At the end I was actually hitting the ball well and felt better at the end. It was good to get through that one.”
The Scot, runner-up four times at Melbourne Park, sealed victory when the Portuguese went long and will next face the winner of the final third-round match between Australians Bernard Tomic and John Millman.
(Editing by Patrick Johnston and Ed Osmond)