The former number one is competing in just his third tournament for over a year due to a hip injury, but the 31-year-old managed to register his second three-set win in a row by prevailing 7-6 1-6 6-4.
The opening stages of Wednesday's contest went with serve, but the pair traded breaks at the end of the first set before Murray took a tie-break by a 7-4 scoreline.
Edmund rediscovered his form in the second with two breaks of serve being enough to take the match into a decider, where Murray could have potentially faltered due to his epic triumph over Mackenzie McDonald earlier this week.
However, it was the Scot who ended the stronger, breaking Edmund's serve in the 10th and final game of the third to set up a last-16 clash with Romania's Marius Copil.
Elsewhere, there were also victories for Cameron Norrie and Johanna Konta, with Norrie getting the better of Feliciano Lopez in the last 16 of the Los Cabos Open and Konta easing past Sofia Kenin to reach the quarter-finals in San Jose.