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.
Williams won 64% of points on the Keys second serve
She won 79% of first serve points and 70% on second serve
Rallies of 0-4 shots – 90; rallies of four or more shots – 21
Serena is fourth in the aces chart on 26, Venus leads on 33
She has spent four hours and 59 minutes on court in four matches
Djokovic dropped a set for the first time in this year’s tournament after routine wins over Andreas Seppi, Andreas Haider-Maurer and Joao Souza in the previous rounds.
It briefly looked as if the 2011 champion could be in more serious trouble as Bautista Agut’s forehand, helped by some indifferent hitting from the opposite end, delivered a stream of winners to wrestle the second set his way.
However the Serb drew on his reservoirs of stamina and shrewdly focussed on his opponent’s weaker backhand wing to prevail in three hours and three minutes.
“I was a set and break up, could have gone 5-2 up in the second and didn’t capitalise. He turned the match around,” explained the 2011 champion.
“He made me work for every point. I had to get in the rallies and it wasn’t easy.”
Cilic survived an examination from France’s Jeremy Chardy, and a twisted ankle, to return to the quarter-finals.
After winning the first set, the Croat rolled his ankle in losing the second and was taken to a third-set tie-break.
But he took that with the help of four aces and breezed through the fourth to complete a 6-3 2-6 7-6 (7-2) 6-0 win.
“Jeremy played really well from second set on and I was having trouble with my movement after twisting my ankle,” said Cilic, a first-time Grand Slam winner at Flushing Meadows last year.
The ninth seed will next play Tsonga, who beat fellow Frenchman Benoit Paire 6-4 6-3 6-4.
Briton Dominic Inglot’s new partnership with Sweden’s Robert Lindstedt has continued its promising start as the unseeded pair overcame Tommy Haas and Radek Stepanek 6-4 6-3.
Inglot and Lindstedt, who won the Winston-Salem doubles title in only their third Tour-level event last month, will play either either sixth seeds Rohan Bopanna and Florin Mergea or ninth seeds Daniel Nestor and Edouard Roger-Vasselin in the quarter-finals.
Should they make the final they could meet Britain’s Jamie Murray and Australian John Peers who advanced through the other half of the draw with a 6-4 6-4 win over Austria’s Philipp Oswald and Canada’s Adil Shamasdin.
Britain’s Colin Fleming and partner Treat Huey of the Philippines were beaten in three sets by Argentina’s Leonardo Mayer and Portugal’s Joao Sousa, going down 6-4 3-6 6-3.