It was also a first career no-hitter for Hamels, who led the Phillies to a 5-0 victory in what could be his final start for the team.
The 31-year-old lefty was the MVP when the Phillies won the 2008 World Series but has been mentioned as a midseason trade target for a number of other teams and the deadline for moves is 31 July.
The no-hitter was completed in dramatic fashion when rookie centre fielder Odubel Herrera stumbled on the warning track as he chased a deep fly ball from Kris Bryant but still managed to make the catch as he lay on the ground.
It was a second great catch in as many innings from Herrera, who robbed David Ross of an extra-base hit in the eighth inning.
It was the first no-hitter versus the Cubs since Sandy Koufax pitched a perfect game in 1965 and Hamels finished with 13 strikeouts.
The pitcher was also part of the Phillies’ last no-hitter, having teamed up with three relievers to shut down the Atlanta Braves last September.
Elsewhere in MLB, Alex Rodriguez hit three home runs for the fifth time in his career to lead the New York Yankees to an 8-5 win over Minnesota.
The Yankees trailed 5-0 early against the Twins but Rodriguez hit Glen Perkins’ first pitch for a tying homer, and John Ryan Murphy later connected for a three-run shot.
Rodriguez hit a 452-foot solo homer in the fourth and a 422-foot drive that made it 5-3 in the seventh, before his 424-foot homer in the ninth cleared the centre field wall.
The last time Rodriguez hit three home runs in a game was 14 August 2010, at Kansas City. He has 23 homers this season and 677 in his career.