Hamels (9-2) allowed one run and three hits to tie teammate Roy Halladay and Boston's Jon Lester for most wins in the majors. He struck out six and walked one.
But the lanky lefty might have to wait before he goes for win No. 10. Hamels left the game in the eighth with tightness in the middle of his back. There was no immediate word on the extent of the injury.
Ryan Howard, Chase Utley and Jimmy Rollins hit two-run homers, and Brown had two solo shots to help Philadelphia win its fourth straight game. The Phillies are a season-high 15 games over .500 at 41-26 - the best record in baseball.
Chris Volstad (2-7) gave up eight runs and 10 hits in 5 2-3 innings for the struggling Marlins. Florida has lost 11 of 12 to fall behind the New York Mets into fourth place in the NL East.
Hamels retired 17 straight before Logan Morrison reached on Howard's fielding error leading off the seventh. It was the first baseman's first error this season.
Hamels is pitching better than he did during the 2008 postseason when he was MVP of the NLCS and World Series. He lowered his ERA to 2.49.
After waiting 1 hour, 20 minutes to start the game because of a rain delay, both teams came out swinging.
The Marlins got two hits in the first and went ahead 1-0 on a RBI groundout by Gaby Sanchez.
The Phillies answered in the bottom half when Howard hit a liner into the seats in left-center for a 2-1 lead. It was Howard's seventh homer off Volstad in 24 at-bats.
Utley connected in the third after Shane Victorino's two-out single. He drove a 3-1 pitch out to right-center to make it 4-1. Brown hit a solo shot in the fourth to put the Phillies ahead 5-1. Rollins' blast made it 8-1 in the sixth.
Brown went deep again in the seventh, hitting a pitch from Edward Mujica into the second deck in right.
Even the return of three-time All-Star shortstop Hanley Ramirez didn't help the Marlins. Ramirez was back in the lineup after missing two weeks with a back injury and batted leadoff for the first time since last Aug. 24. He was 0 for 4 with two strikeouts.
Notes: Hamels hadn't had much success against the Marlins. He improved to 5-7 lifetime vs. Florida. ... Howard is 12 for 24 with 11 RBIs against Volstad. ... A crowd of 45,424 was the 173rd straight sellout at Citizens Bank Park, including postseason play. ... The Phillies are 29-7 when they hit at least one home run. They improved to 2-9 on Tuesdays. ... Florida's Emilio Bonifacio is 13 for 25 during his six-game hitting streak. ... The Marlins are 8-12 against left-handed starters.