Keselowski led the final nine laps, conserving just enough fuel to stave off Earnhardt for his first win since taking Talladega 75 races ago.
"There are some secrets to it and I just maximized them all. I had plenty (of fuel) left," Keselowski said.
Earnhardt appeared set to make a late charge on Keselowski. That push never came -- though Earnhardt did move up to third in the standings and is just one point behind Jimmie Johnson.
For the second week in a row in a fuel-mileage race, Earnhardt came up just short. He ran out of gas near the finish in Charlotte and wound up seventh.
"Anytime you win a fuel mileage race you've done something as a driver," Earnhardt said. "We don't know what we're doing really trying to save gas or how much we're saving. But (Keselowski) had a hand in it."
Johnson fought from 31st position and finished seventh.
Polesitter Busch led 152 laps and finished ninth. He had to stop for gas as the leader with 10 laps left.
"I was all smiles. I felt the groove again, to lead the race. It was great. It was solid," Busch said.
"There was always something in the back of my mind that we weren't going to win, but I am proud Brad Keselowski did."
Keselowski won the pole last week at Charlotte and has been on a monthlong upswing for Penske.
He seemed to come to life just as teammate Kurt Busch reached his wits end, with his displeasure culminating in an expletive-laden rant against team management.
That led to behind-the-scenes personnel changes at Penske, including the announcement that technical Tom German was leaving the team to attend a graduate program at MIT.
But Keselowski also took exception to a comment Busch made that it had been several years since he'd had a teammate capable of running the same pace as him.
Since then, Keselowski logged a third-place finish, raced his way into the All-Star race and, on Sunday, earned a win that could help him nab a wild-card spot in the Chase to the Sprint Cup championship.
"It's because of the bad finishes and the struggles that we had to get here that I really appreciate this win," Keselowski said. "We're in good shape. A few more wins like this and we can make the Chase."
The buzz before the Sprint Cup race was about the altercation between team owner Richard Childless and Kyle Busch that followed Saturday's Trucks Series race.
NASCAR said Kyle Busch did nothing to violate his probation, clearing the driver of any fault in the incident President Mike Helton deemed "unacceptable." Childless, though, had his track access restricted and will be subject to further penalty this week.
Kyle Busch, who led 11 laps, wound up 12th after his eventful weekend.
"It was a solid day," he said. "Qualified up front and ran decent much of the race. We probably had a seventh or eighth-place car (Sunday) and just kind of got off fuel mileage there at the end."