Koehler retired 15 in a row during one stretch and pitched six innings Wednesday, helping the Miami Marlins beat the fading Phils 5-0.
"He was warming up and pitching like she was going to give birth any second," said Marlins catcher Jarrod Saltalamacchia, who hit a two-run homer in the ninth.
Koehler (6-6) left the ballpark immediately after the game. The Marlins placed him on paternity leave and said his wife, Ashley, was expected to deliver their first child -- a daughter -- by Thursday morning.
"Big news," manager Mike Redmond said. "We're excited about that, and glad he got a big win on a big day for him and his wife."
Casey McGehee reached base three times, doubled home a run and scored another to help hand the Phillies their sixth consecutive loss. The Marlins, who lead the majors in home victories, clinched the three-game series and improved to 27-21 at Marlins Park.
Cole Hamels (2-5) gave up three runs and needed 97 pitches to get through five innings, ending his career-best 10-game streak of pitching at least seven innings.
"I wasn't getting ahead of guys," Hamels said. "Then, when I had to throw a strike, I left it up in the zone in a place where they were able to make solid contact."
Hamels, a victim of poor run support all season, remained winless since June 6. The Phillies were shut out for the 11th time, which is tied for second-most in the majors.
"It's hard to believe," manager Ryne Sandberg said. "Maybe it's a pressing situation. We need somebody to get it going -- everybody to feed off of somebody coming through."
The Phils matched their longest losing streak of the year and fell 12 games below .500 for the first time.
Philadelphia reliever Mario Hollands took a sharp grounder off the left knee for a single in the ninth, gave up Saltalamacchia's homer and a double and then left the game accompanied by a trainer. Afterward, he said he was fine.
The homer snapped Hollands' streak of 18 consecutive scoreless innings.
Koehler allowed three hits and earned his first victory since June 4. Three relievers completed a five-hitter.
Ben Revere and Jimmy Rollins started the game with singles, but Koehler didn't allow another baserunner until the sixth. The Phillies' first two batters also reached in that inning, but again they failed to score. They went 0 for 6 with runners in scoring position.
McGehee increased his hits total to 100, hiked his average to .312 and reached base for the 26th game in a row. He has revived his career after spending 2013 in Japan, but he said he's not about to rest on his accomplishments since joining the Marlins.
"It's half a season," he said. "I've seen how quick things can change. I've got to keep going every day. If you start patting yourself on the back, this game has a nasty way of reminding you you're not bigger than the game. It'll hunt you down."
Marlins LHP Brad Hand (0-1, 6.38) will come off the disabled list to start Thursday against Phillies RHP Kyle Kendrick (3-8, 4.22). ... Philadelphia OF Domonic Brown went on the paternity list, and he's expected to rejoin the team this weekend in Pittsburgh. OF Aaron Altherr was recalled from Double-A Reading. ... The Marlins recalled INF Justin Bour from Triple-A New Orleans. ... Phillies LHP Cliff Lee (elbow) is scheduled to begin a rehab assignment Sunday with Class-A Clearwater. He'll throw 65 to 75 pitches. ... Phils C Wil Nieves began a rehabilitation assignment with the Gulf Coast League Phillies.