Edmund broke the Scot in the first game of the match but had to immediately save three break points to take an early 2-0 lead in the opening set.
The 23-year-old, who will be the 22nd seed at Wimbledon, saw out the remainder of the opening set sealing it 6-4 with an ace down the middle.
Edmund stormed into a 5-2 lead in the second set but was pegged back as the two-time Wimbledon champion won back-to-back games.
‘Avengers assemble’ – Murray joins Team Europe for the Laver Cup
The British number one held his nerve though to serve out for a 6-4 6-4 victory and will face Kazakhstan's Mikhail Kukushkin in the last eight, but said the experience had been strange.
It was a bit of a tough match, mentally, playing Andy but I had to try to view it as another match. It's always nice to come through like that. I've looked up to Andy so much and he's looked after me and really been good for me so it's a bit of a weird feeling. I was a bit nervous towards the end. To practice with him at the start was weird and to play with him was a bit funny. I think I played a reasonably solid match.
Britain's Cameron Norrie is also into the quarter-finals after a 6-4 6-3 victory over compatriot Jay Clarke and will face Slovakia's Lukas Lacko in the last eight.
Earlier, Johanna Konta was beaten in three sets by top seed Caroline Wozniacki at Eastbourne as the Dane booked her place in the quarter-finals.
The British number one won the first set but was knocked out 4-6 6-1 6-4 in her first defeat in three matches against the world number two.
It was 27-year-old Konta's final match before she returns to Wimbledon where she enjoyed a memorable run to the semi-finals last year.
Wimbledon order of play, Day 3 - When are Djokovic, Raducanu and Murray playing?
'Remove them from the crowd' - Kyrgios angry at 'disrespect' from fans
Share this article