Hamels (6-7) threw 129 pitches over nine innings while striking out 13 and walking a pair as the Phillies (36-63) won their third straight and seventh in eight games since the All-Star break.
Cubs third baseman Kris Bryant sent a liner to center for the final out.
Phillies center fielder Odubel Herrera helped preserve the no-hitter in the eighth inning with a diving catch at the wall on Cubs catcher David Ross' drive to the warning track.
The no-hitter was the second of Hamels' career. He combined with three relievers for a hitless game on Sept. 1, 2014, as the Phillies beat the Atlanta Braves 7-0. Hamels threw 118 pitches and worked six innings that day.
The Cubs had not been no-hit since Dodgers left-hander Sandy Koufax tossed a perfect game on Sept. 9, 1965.
Hamels has been the subject of trade speculation in the run up to next week's deadline. The Cubs are said to be among the interested parties.
Cubs right-handed starter Jake Arrieta (11-6) allowed a third-inning home run in a six-inning outing as the Cubs (51-45) dropped their second straight.
Phillies first baseman Ryan Howard clubbed his 17th home run of the season, a three-run shot in the third inning. His drive to center field came on a 1-0 pitch from Arrieta and scored Herrera and third baseman Maikel Franco.
The Cubs' lone early threat came in the first inning when center fielder Dexter Fowler walked to lead off and was forced out by a first baseman Anthony Rizzo's fielder's choice. Rizzo stole second base but was stranded when right fielder Jorge Soler struck out.
Fowler reached base again with two out in the sixth on Hamels' second walk and stole second but stayed there as Bryant ended the inning with Hamels' ninth strikeout.
The Phillies added two runs in the eighth as left fielder Cody Asche singled and shortstop Freddy Galvis doubled. Both runners scored on Rizzo's throwing error.
Hamels then came to the plate, received an appreciative hand from the crowd and promptly doubled to the wall off left-hander James Russell.
Arrieta, meanwhile, had a 94-pitch workout in six innings. He allowed three runs on six hits while striking out eight and walking three.
NOTES: Phillies OF Jeff Francoeur got a well-deserved break from the starting lineup after a five-game run with three home runs, including a game-winning, two-run shot Friday. ... RHP Jonathan Papelbon has yet to blow a save opportunity and is among three pitchers who have saves in all of their chances. ... Phillies RHP Aaron Nola (0-1, 1.50 ERA) will make his first career appearance against the Cubs and RHP Jason Hammel (5-4, 2.82) on Sunday in the series finale. ... The Cubs' 5-3 loss to the Phillies on Friday was only the second time this season that the Cubs had lost a game after entering the ninth inning with a lead. ... Chicago has 51 victories. In 2014, the Cubs did not get their 51st until Aug. 12. ... Chicago's homestead continues with Monday's opener of a three-game series against Colorado.