The world number one, who had been given a bye into the second round of the claycourt tournament, was the first player to reach the last 16 on a day when most of other players were still involved in first-round matches.
Federer had been forced to battle to 7-5 in the deciding set when he played Almagro in last year's Rome quarter-finals.
This time, however, he looked totally in control, raising his game to break the Spaniard in his opening service game, then again in the first game of the second set.
When Almagro created his sole break point of the match, Federer thumped down an unreturnable first serve.
"I wasn't too happy when I saw the draw, playing Almagro first up, because he's a great clay courter and a very dangerous player on any surface," said Federer, who finished runner-up in the Italian capital in 2003 and 2006.
"So to come through convincingly in two sets, not being broken and both times racing away with the lead after an early break, that was perfect."
In Tuesday's other matches, claycourt specialist Gaston Gaudio beat Mardy Fish 6-4 6-4 to set up an intriguing second-round clash with third seed Andy Roddick.
Gaudio, who has slipped back to 71 in the world since winning the French Open in 2004, remains a dangerous opponent for Roddick, who is playing his first tournament since returning from a hamstring injury and whose big-serving game is not well suited to clay.
Former world number one Marat Safin went through to a second-round clash with fourth seed and fellow Russian Nikolay Davydenko after he beat Amer Delic 2-6 6-3 6-4.
"It will be very tough. These past few months have been difficult for me," said Safin, who has lost in the second round of his last three Masters Series events in Monte Carlo, Miami, and Indian Wells.
"He's been in the top 10 for two years in a row, played some great matches, great tournaments. He'll have a lot of confidence."
There were also first-round victories for ninth seed James Blake, 12th seed Tomas Berdych, and 15th seed Mikhail Youzhny.
Eleventh seed Tommy Haas went out, however. The German retired with a shoulder injury at 6-3 3-2 down against Radek Stepanek.
Stepanek's next opponent is Marcos Baghdatis, who unleashed a barrage of powerful, angled groundstrokes to dispose of 2004 Rome winner Carlos Moya 6-2 6-3 in just over an hour.