Nick fought back to hold serve, but Federer went on to close out the match in straight sets, 6-4, 6-1, 7-5.
When she ripped a backhand victor to claim the third set's opening game yesterday, Williams let out her loudest shout of the day, leaning forward and rocking both arms.
In the match's seventh game, Federer faced a total of four break points.
Kyrgios will depart the season's final grand slam provisionally ranked No.27 in the world, just 15 spots higher than inspired countryman John Millman.
"I definitely think it was a special one, no doubt about it", said Federer after being asked if the shot was one of the greatest of his illustrious career.
"I take one of those points, the match is wide open", Kyrgios said.
"I was trying to tell him that the shot wasn't that good", Kyrgios joked.
Serena Williams' yells of "Come on!" were crescendoing right along with the tension in a fourth-round US Open match that began as a rout and suddenly became riveting.
Millman's victory vaulted him into the second week of a major for the first time. Turned out Kyrgios would not muster another break chance.
That was the first set she had lost against Kanepi of the 10 they'd played to that point, and the first set Williams had lost at the 2018 US Open, a run that included a 6-16-2 victory over her older sister Venus in the third round Friday night. "He loosened up straightaway after that".
"I enjoy playing against Nick, he comes up with different types of shot making and that keeps you on the edge and it's always entertaining".
For many, his visit to NY this year was his tennis career in a nutshell.
The five-time champion is geared up to add more silverware to his illustrious 20 Grand Slam titles, but has not triumphed in NY since 2008. All the pressure was off him. Federer then bested the tricky Benoit Paire 7-5 6-4 6-4, in a performance that was more workman-like than it was clinical. "When he gets in front, there's not much you can do". As well as Federer neutralized his game, the 6-foot-4 Kyrgios said he might be able to learn something from Saturday. I think there is a lot more to be done and there is a lot more to be, I mean, explored.
Cibulkova, the 29th seed, moves on to face 2017 finalist Madison Keys, who shook off a slow start to beat Serbian Aleksandra Krunic 4-6, 6-1, 6-2.
Kerber, who counts the 2016 US Open among her three Grand Slam trophies, was seeded No. 4, and joins No. 1 Simona Halep and No. 2 Caroline Wozniacki in making first week exits - all in matches played on the new Louis Armstrong Stadium.