In the women's draw, Australian Open champion Serena Williams was forced to endure a racist heckler before disposing of Czech Lucie Safarova 6-3 6-4 to remain on course for a fourth title.
Second seed Justine Henin was also in supreme form, cruising into the quarter-finals with a 6-3 6-2 win over Russia's Vera Zvonareva.
However, her Belgian compatriot and fourth seed Kim Clijsters, who will retire before the end of season, appears certain to have played her final match on U.S. soil after losing 4-6 6-4 6-2 to China's Li Na.
The stadium court was the scene of some enthralling action on Monday but that was overshadowed by an ugly incident late in a day that saw spectator removed by security for hurling verbal abuse at Williams throughout her match.
The WTA confirmed the spectator was taken from the stadium and turned over to Miami Dade police.
"The guy said, "Hit the net like a Negro would'," Williams told reporters. "I was shocked. I couldn't believe it.
"It was derogatory. It was outrageous."
Playing in her first event since the Australian Open in January, Williams will need to regain her composure for her fourth round clash against top seed Maria Sharapova of Russia early on Tuesday.
For the second straight match Sharapova will face one of the Williams sisters, having already dispatched Venus in the third round. The contest against Serena is a rematch of the Australian Open final, won 6-1 6-2 by the American.
CANAS NEXT
Federer, bidding to bounce back from a shock second round loss at Indian Wells and become the first player since Andre Agassi to win three consecutive titles in Miami, never hit top gear against Almagro as he improved his season record to 14-1.
Almagro held the Swiss at bay through a close opening set that had looked headed for tie-break until he double-faulted while serving at 6-5 to hand Federer the break and a one-set lead.
The Spaniard marched angrily towards his seat, slamming his racquet onto the court, and never threatened again as Federer recorded an early break in the second set to storm to a commanding 4-1 advantage.
Federer will next face Guillermo Canas, the man who ended his career best 41-match winning streak with a second round upset at Indian Wells.
Canas advanced with a 7-6 6-3 win over 15th seeded Frenchman Richard Gasquet.
American qualifier Amer Delic posted the day's biggest upset when he stopped fourth seeded Russian Nikolay Davydenko 7-6 6-3 to claim the first top 10 scalp of his career.
Henin's victory guarantees she will hold onto top spot in the world rankings for another week.
Sharapova, who lost the number one to Henin last week, had a chance to return to the top in Miami but needed to have the Belgian lose before reaching the final eight.
Henin took 84 minutes on a blustery Stadium court to dispose of the 18th seeded Zvonareva and is now approaching uncharted territory having never before advanced past the quarter-finals in five previous Miami appearances.
More from rediff