Hamels (17-6) surrendered just one run on five hits over seven innings, reaching the 17-win plateau for the first time in his career.
Carlos Ruiz and Nate Schierholtz each knocked in a run as the Phillies won a second straight game.
Marlins starter Nathan Eovaldi (4-13) was tagged with the loss, allowing three runs on six hits over six innings.
Carlos Lee notched the only RBI for Miami.
Ray Liotta sues skin care company over use of likeness
Boston schools pull out free condoms over wrapping complaints