Ryan Madson (3-2) couldn't protect a one-run lead after Carlos Ruiz put Philadelphia ahead with a solo homer in the seventh.
Ryan Zimmerman led off the eighth with an infield single. Lastings Milledge followed with a single and Ronnie Belliard sacrificed.
Jesus Flores' RBI single up the middle tied it at 3. Second baseman Chase Utley made a diving stop to temporarily save a run, but Kearns lined a single to center to give the Nationals a 4-3 lead and their first victory since a doubleheader sweep of Colorado on Aug. 7.
Saul Rivera (4-5) allowed two runs in one inning, but earned the win. Joel Hanrahan pitched out of trouble in the eighth and ninth to record his fourth save. He retired pinch-hitter Chris Coste on a slow grounder to shortstop with a runner on third to end it.
The Phillies wasted another strong outing from 45-year-old Jamie Moyer. The left-hander gave up two runs - one earned - and five hits in 6 2-3 innings. Moyer has allowed three runs or less in 14 consecutive starts, but has only five wins in that span. Chris Short was the last Phillies pitcher to do that in at least 13 consecutive starts. Short's streak reached 23 in 1967.
Nationals starter Tim Redding allowed one run and three hits in six innings. He came in having allowed 20 runs in his last 20 innings.
Reigning NL MVP Jimmy Rollins continued to hear some boos from fans who are upset that he called them "frontrunners" in a television interview last week. Rollins hasn't given them any reason to be forgiving. He's 3-for-33 since making the comments during a trip to Los Angeles.
The Phillies, who led the NL in runs the past two seasons, have scored three runs or fewer in 40.2 percent of their games. They are 11-40 in those games.
Ruiz, a light-hitting catcher, gave Philadelphia a 3-2 lead when he drove a 1-0 pitch from Rivera over the wall in left-center for his third homer of the season and first since June 7 at Atlanta.
Pinch-hitter Greg Dobbs' RBI groundout tied it at 2 one batter before Ruiz went deep. Shane Victorino reached on an infield single and advanced to third on third baseman Zimmerman's throwing error. He scored on Dobbs' bouncer to second.
Anderson Hernandez's RBI infield single in the seventh put the Nationals ahead 2-1.
The Nationals scored an unearned run to break a scoreless tie in the sixth. Hernandez and Cristian Guzman lined consecutive singles to start the inning.
After Zimmerman struck out, Milledge hit a grounder to third that should have been a double play. Guzman slid hard into second, altering Utley's throw that sailed away from first baseman Ryan Howard for an error. Hernandez scored after the ball hit off Howard's glove.
Utley made up for it in the bottom of the inning with a two-out RBI single that tied it at 1.
Notes: Howard is in a 3-for-35 slump with 18 strikeouts. He is on pace for 213 strikeouts, which would break the season record of 199 he set last year. ... The Phillies drew 41,568 fans, snapping their sellout streak at 16 games.