The first two sets featured sizzling skill from the service line as neither player lost a game on his own delivery and both sets went to tiebreaks.
Federer won the first 7-5 and the second 7-4 against the man he beat in last year's final.
The Swiss world number one and top seed claimed the first service break of the high intensity match in the sixth game of the third set when Roddick sailed a backhand long to fall behind 4-2.
Federer broke Roddick again for good measure in the last game when the American netted a backhand on match point to end the contest after just over two hours.
The victory sent Federer into Saturday's semi-finals against fourth seed Nikolay Davydenko of Russia, who beat 10th seed Tommy Haas 6-3 6-3 6-4.
"I tried to hang in there. I didn't have a break point until the third set," Federer told the crowd. "It was a tough match, and he was serving out of a tree. But I came through in the end in straight sets."
Federer struck 48 winners and 18 errors. Roddick was also brilliant, with 42 winners and just 10 errors.
Roddick served 14 aces and Federer, seeking his 12th grand slam title, 15