Murray, competing in his 100th Masters 1000 event at the Western & Southern Open, overcame American wildcard Tiafoe 7-6 (6) 3-6 6-1
The New York tournament is serving as a warm-up event for players ahead of the US Open, which begins on August 31.
And Murray had a sound work-out after being hit by hip problems before the coronavirus pandemic shut down the sport.
The first set went with serve and the three-time grand slam winner had to save a break point in the 11th game.
Tiafoe was then on top in the tie-break, leading 5-2 before Murray fought back to level.
Murray saved a set-point at 5-6 and won the next two points to strike an advantage.
The second set followed a similar tight pattern until Tiafoe broke to make it 5-3 and served out to level the match.
But it proved a false dawn for the American as Murray called on all his renowned resilience.
The Scot dominated the third set and completed his win in two hours and 28 minutes to secure a last-32 date with Alexander Zverev.