"Our car was awesome," said Keselowski, who became the first repeat winner at the track. "Our team did a great job. I'm just really fortunate to have such a good car."
Kyle Busch finished second, one second behind Keselowski. Ryan Newman was third, Matt Kenseth fourth and Dale Earnhardt Jr. rounded out the top five.
"It's a big gain for us and our Caterpillar Chevrolet," Newman said of his best finish of the season. "All the guys at RCR (Richard Childress Racing) and ECR (Earnhardt Childress Racing) got us that first top-five of the season."
Keselowski gave up the lead to head down pit road for the final time during a caution with 55 laps remaining. Busch was among the drivers who stayed out after having pitted under green just before the yellow flag.
After staying out, Busch restarted with the lead, becoming the first non-Team Penske driver to lead the race. Keselowski, meanwhile, restarted sixth and quickly made his way back toward the front. He moved into the second position with 37 laps to go and was able to retake the lead from Busch in traffic with 19 laps to go.
"We certainly wanted to win," Busch said. "When we got up to traffic, I had to back it up. We finished second to the best car."
Before losing the lead to Busch, Keselowski had already led 179 laps, with teammate Joey Logano leading the rest.
"I knew it was going to be really, really tough," Keselowski said. "I knew we would be able to get to him (Busch), but I didn't think we'd be able to pass him."
Logano was the only driver able to pass Keselowski, getting by him once on a restart with 86 laps remaining. Logano also took the lead from Keselowski several times throughout the race on pit road, getting out of the pits in front of Keselowski during most of the six cautions. But each time, after a few laps, Keselowski would retake the lead.
Logano wound up finishing ninth after suffering an engine problem late in the race.
"I had a ninth-place finish, down a cylinder," Logano said. "That was a good effort by my guys. They kicked some butt on pit road today."
Jeff Gordon finished sixth, Kevin Harvick seventh, Kasey Kahne eighth, and Jimmie Johnson 10th.
Keselowski pulled away from the field at the start of the race, and he and Logano had a cushion of nearly half a straightaway by the time the first caution of the race came out on lap 29.
Logano lost second to Kevin Harvick after the restart on lap 34, but Keselowski maintained his spot up front. Keselowski built another sizable lead of 3.3 seconds before the second caution of the race on lap 76.
Pit road resulted in a reversal of fortunes for Logano and Harvick. Logano got back on the track before Keselowski to take the lead, but Harvick's crew had trouble in the pits, missing lug nuts and then sending Harvick out on the track with a loose wheel.
Logano's lead was short-lived. Keselowski was back up front by lap 90. Logano then fell into the clutches of Busch around lap 110, and after a few laps of battling for the spot, Busch took second.
NOTES: The 2014 Quaker State 400 is only the fourth Sprint Cup race in history at Kentucky Speedway. ... Matt Kenseth went into the race as the defending champion. Kyle Busch was the other previous winner. ... Joe Gibbs Racing won two of the previous three Kentucky races. ... Of current manufacturers, Toyota is the only one with a previous Sprint Cup win at Kentucky with two. Brad Keselowski won when Dodge was still competing in 2012. ... Kyle Busch won the NASCAR Camping World Truck Series race at Kentucky on Thursday and Kevin Harvick won the NASCAR Nationwide Series race on Friday night. ... Kentucky Speedway is the only track on the current schedule where Jeff Gordon hasn't won. ... This year's Kentucky race was one car short of a full field with 42 competitors.