Kyle Kendrick (7-4) went eight innings, allowing two runs on seven hits with six strikeouts and no walks to pick up the victory.
Jason Marquis (9-3), who had won eight straight decisions over his last 11 starts, went 4 1-3 innings, giving up six runs on six hits, walking five and striking out four to take the loss.
He allowed back-to-back walks on eight pitches to Ryan Howard and Brown in the fifth inning, which led to Marquis' exit from the game and contributed to three more runs by the Phillies, who took their 6-2 lead.
Philadelphia parlayed singles by Jimmy Rollins and Chase Utley along with three walks, a wild pitch and a sacrifice fly by John Mayberry Jr. for the three runs.
Marquis, who hadn't lost a game since April 22 against Milwaukee, leads the majors in walks with 53. He has had four or more walks in 11 of his 16 starts.
The Padres have lost five of eight since a season-high seven-game win streak.
Brown, who walked with the bases-loaded in the fifth to drive in a run, had hit a three-run homer off Marquis in the third for a 3-2 lead.
Rollins walked to lead off the third and stole second. He went to third on a one-out single by Michael Young.
Marquis struck out Howard, but Brown hit a 2-0 pitch 411 feet into the right-center field stands.
The Padres had taken a 2-0 lead in the bottom of the second. Kyle Blanks singled to right and Yasmani Grandal doubled to left. Alexi Amarista's infield grounder to second scored Blanks, and Pedro Ciriaco's single to left scored Grandal.
The Padres threatened in the ninth on Grandal's single and Ciriaco's third hit of the game, a double. But reliever Antonio Bastardo struck out Logan Forsythe for the final out.
NOTES: Padres LHP Robbie Erlin (1-0, 4.15 ERA) will be called up from Triple-A Tucson on Wednesday and will make his second major league start against Philadelphia. "We like we saw when he beat the Blue Jays. He's getting to a point where he's about to break through," said Padres manager Bud Black. LHP Cole Hamels (2-11, 4.50 ERA) will pitch for the Phillies in the final game of the series. . Padres 2B Jedd Gyro, on the DL with a right groin strain, flew to San Antonio on Tuesday and will play with the Padres Double-A team Wednesday and Thursday. If all goes well, according to Black, Gyorko would be activated and would join the team Friday in Miami ..Padres 3B Chase Headley batted cleanup Tuesday for the second straight day. However, Black said he will likely not stay there even if he heats up. "We were hoping a different look would give him a different perspective on the game. I don't think it had anything to do with him getting two hits (on Monday).". Phillies 1B Ryan Howard returned to the starting lineup after sitting out Monday's game with a sore left knee. Howard was batting .432 over his last 12 games with three home runs and 11 RBIs. . Phillies RHP Carlos Zambrano is scheduled to make another start at Triple-A Lehigh Valley on Friday before the club makes a decision whether to call him up. Zambrano, who last pitched in the majors for the Miami Marlins in 2012, is 1-0 in three starts with Lehigh Valley with a 3.18 ERA, 17 strikeouts and nine walks in 16 innings.