Stewart dominated the race, leading 160 of the 312 laps, but had to pit for gas with 18 laps remaining. He then had to work his way back to the front, and used a late pass of Jeff Burton to finish third, right behind Edwards.
The points margin didn't change, and Edwards goes into next weekend's season finale leading Stewart by three points. Edwards is going for his first Sprint Cup championship, while Stewart is a two-time champion.
"We're going to make him sweat it out," Stewart said. "As far as I'm concerned, it's a dead heat going in there. I'm pumped. I wish I was going to Homestead tomorrow."
So did Edwards, a two-time Homestead winner.
"This is going to be a battle. I truly believe it's going to be a good race," Edwards said. "That place is magical for us. I really enjoy going there.
"I hope it comes down to the fastest guy winning the race."
It's the closest title race since NASCAR implemented the 10-race Chase for the Sprint Cup championship in 2004.
Five-time defending NASCAR champion Jimmie Johnson finished 14th and was officially eliminated from title contention.
"It's been one hell of a run," he posted on Twitter shortly after the race.
Kahne, meanwhile, won for the first time since Atlanta in 2009, and it comes in his next-to-last race with Red Bull Racing. He's moving to Hendrick Motorsports next season, and Red Bull is pulling out of NASCAR.
Burton finished fourth and was followed by Ryan Newman.
AJ Allmendinger was sixth, and David Reutimann, told two weeks ago he was losing his job at Michael Waltrip Racing, was seventh.
Marcos Ambrose finished eighth and was followed by Paul Menard and Clint Bowyer.
Kyle Busch, racing again after NASCAR parked him at Texas last weekend for intentionally wrecking Ron Hornaday Jr., worked his way up to third before his engine failed. He finished 36th.
"It's just devastating," Busch said. "To go through turmoil like this, all you can do is group together and pull through it and try to persevere and move on."
Busch, who started the Chase tied with Kevin Harvick as the top seed, will almost certainly finish 12th in the final standings and won't be included in the season-ending awards ceremony held in his hometown, Las Vegas.
His older brother, Kurt, didn't fare any better at Phoenix. He ran out of gas while leading and wound up 22nd.
The race was also marked by another incident between Brian Vickers and Matt Kenseth, who tangled two races ago at Martinsville. Kenseth said Vickers intentionally wrecked him, but Vickers denied it.
"If he wants to doubt us, that's fine," Vickers said. "He wrecked me at Martinsville, he got wrecked here, but it actually wasn't (payback). I'm not saying I wasn't going to pay him back, but I'm just saying that wasn't it."