Williams, the world number one, beat her fellow American 6-3 6-3 to set up a quarter-final against her sister Venus.
Serena, 33, is now three wins from competing the first calendar Grand Slam since Steffi Graf in 1988.
Novak Djokovic overcame an in-form Roberto Bautista Agut, subduing the Spanish 23rd seed 6-3 4-6 6-4 6-3.
Men's defending champion Marin Cilic and 19th seed Jo-Wilfried Tsonga both won and will meet in the last eight.
Williams knew she faced a serious threat in the powerful 19-year-old Keys, and the six-time champion produced a clinical performance.
She had looked nervous and on edge throughout the first week, with her normally impregnable serve vulnerable - the most dominant shot in tennis was broken five times in three matches.
Williams hit the practice court hard after her third-round match, and she would not offer up a single break point against Keys.
"I served much better today," Williams said afterwards. "I'm so proud I was able to serve better.
"Obviously I had to - I knew I wouldn't have too many chances to break."
In a match dominated by short rallies of fewer than four strokes, Keys cracked first with two double faults in a row to give up the break in game eight.
Williams duly served out and kept the pressure up in the second set, missing a host of break points before converting the seventh to lead 4-3.
She did not require any help, but a net cord handed Williams match point and a Keys double fault brought an end after 68 minutes.
The next player in Serena's path is her 35-year-old sister Venus, who beat Estonia's Annett Kontaveit 6-2 6-1.