World number one Rafael Nadal recorded his 20th straight win on clay as he began his quest for a sixth title in Madrid, defeating Frenchman Gael Monfils 6-3, 6-1.
Nadal, who received a bye in the opening round, fired 17 winners and went on to lose just one of 13 service points in the second set to seal victory.
The 31-year-old Spaniard has now won 48 consecutive sets on the surface, two sets shy of breaking American John McEnroe's record of 49 straight sets on a single surface in 1984.
World number seven Dominic Thiem and sixth-seed Kevin Anderson joined Nadal and Edmund in the last-16 but home favourite Feliciano Lopez, who will become tournament director next year, was beaten by Argentine Diego Schwartzman.
Wozniacki, Muguruza knocked out in Madrid, Halep strolls into quarters
World number two Caroline Wozniacki was sent packing from the third round of the Madrid Open on Wednesday while third-ranked Garbine Muguruza followed her swiftly out the exit door.
Denmark's Wozniacki lost 6-2, 6-2 to world number 20 Kiki Bertens, while Wimbledon champion Muguruza was beaten 6-2, 4-6, 6-3 by Daria Kasatkina in a thrilling late game.
Bertens, who reached the 2016 French Open semi-finals, beat the 27-year-old Wozniacki in an hour to claim the biggest scalp of her career and end Wozniacki's hopes of reclaiming the number one spot from Simona Halep.
Australian Open champion Wozniacki had to win the Madrid title to overhaul Halep in the top spot but her defeat means the Romanian will retain first place.
Bertens' will face five-time Grand Slam champion Maria Sharapova or Kristina Mladenovic of France in the last eight.
Spaniard Muguruza was playing in the last-16 of the Madrid Open for the first time but could go no further as she was overpowered by 15th-ranked Kasatkina in a thrilling late game which lasted two hours and 28 minutes.
Muguruza got off to a bad start in surrendering the first set against Kasatkina, who she had lost to in the semi-finals of the Dubai Duty Free Tennis Championships in February.
The 2017 Wimbledon and 2016 US Open champion was on the ropes when she was broken for the second time in the second set to fall 4-2 behind, but she came out fighting, breaking back immediately and once more to take the set.
She also showed great fighting spirit in the decider after going 4-1 down, saving eight break points to hold her serve and then break again to make it 4-3.
The 21-year-old Kasatkina, however, won the next two games and served out for the match, clinching a quarter-final berth when the Spaniard hit beyond the baseline.
The Russian will meet Czech Petra Kvitova who overcame Estonian Anett Kontaveit 6-7(4), 6-3, 6-3.
Earlier on Wednesday, Halep strolled into the quarter-finals with a 6-1, 6-4 win over Czech Kristyna Pliskova.
Halep, the two-time defending champion, struck 20 winners and broke Pliskova's serve three times as she extended her winning streak in the Spanish capital to 15 straight matches.
After conceding the opener in 29 minutes, Pliskova produced a better second set but failed to deliver consistently as Halep saved all five of the break points she faced.
"I think she served much better (in the second set) and I couldn't do much with the return," Halep told a news conference.
"But I served well, too. I feel like it was a very good match, the hardest here. She has improved a lot since last year, we played together here, and she was a different player."
Halep will next face Krystyna's twin sister Karolina Pliskova, who raced past American Sloane Stephens 6-2, 6-3.