In the last four the Swiss, who is attempting to become only the third man in the professional era to win four consecutive Wimbledon singles titles, will face either Czech Radek Stepanek or Sweden's Jonas Bjorkman.
Ancic's shock win over Federer at Wimbledon in 2002 was the last time the Swiss lost a match on grass but the Croatian seventh seed failed to cause the top seed any real problems in humid conditions on Wednesday.
"It was difficult with the rain delays and knowing that he was the last guy to beat me here. It was a hard loss for me," said Federer.
"I thought I played a terrific match and I really enjoyed it out there. I was prepared for a very difficult match so I'm even more surprised I came through so convincingly.
"I definitely got on a roll. Usually rain delays slow you down but they really got me going."
The match was interrupted three times in all -- twice by rain and once by two protesters who were quickly hustled off court -- but Federer's concentration was unbroken throughout.
Their only previous meeting on grass was that match in the first round in 2002, when Ancic won in three sets. Federer has won all three of their meetings since, including their French Open quarter-final last month.
A rain break early in the match unsettled Ancic and when they returned the 2004 semi-finalist went 0-40 down and lost serve when Federer struck a forehand pass to lead 3-2.
After security officials dealt with the two protesters Ancic had a glimmer of hope trailing 4-3 when a double-fault gave him a break point.
The Croatian netted a forehand, though, and Federer recovered to hold and serve out the first set.
The champion showed why he is world number one with a sizzling forehand crosscourt winner to break Ancic in the first game of the second set and he led 3-2 when another brief rain flurry caused a further hour-long stoppage.
It did not disrupt Federer's rhythm, though, and he calmly held serve to go two sets up when Ancic netted an attempted backhand service return.
EXQUISITE TOUCH
The Australian Open and US Open champion broke serve twice at the start of the first set and Ancic even joined the crowd in their applause after Federer showed exquisite touch with his backhand to win one rally.
Ancic, though, did manage a break of serve to make it 3-1 but he tossed his racket in despair after Federer saved another break point at 4-3 with a ripped forehand winner.
The champion soon confirmed his 46th consecutive victory on grass with an ace before slipping on his now familiar personalised cream jacket and heading back to the changing room, job done.
Friday's match in the last four will be his ninth consecutive grand slam semi-final, only one short of Ivan Lendl's professional era record.
Swede Bjorn Borg and American Pete Sampras were the last two players to win four Wimbledon singles titles in a row and Borg is also the only man in the professional era to have won the singles title without dropping a set.
Borg did it in 1976 and Federer is firmly on course to emulate him.
More from rediff