Chase Utley's two-run double slipped out of Cameron's glove in the third, helping the Phillies take a 3-0 lead. Lidge allowed a run in the ninth but struck out Corey Hart with runners at second and third to end it.
Game 2 in the best-of-five series is Thursday, with ace CC Sabathia going to the mound for the wild-card Brewers on three days' rest for the fourth consecutive start. Brett Myers pitches for the Phillies.
It'll be tough for anyone to match Hamels' superb performance. The 24-year-old lefty retired the first 14 batters and allowed two hits, striking out nine.
Lidge, 41-for-41 in save chances during the season, pitched out of trouble in a shaky ninth. The Brewers had the tying run at the plate when Prince Fielder fanned for the second out. After J.J. Hardy walked to put two runners on, they advanced on a wild pitch. But Hart struck out swinging to end it.
Hamels baffled the fastball-hitting Brewers with his dazzling changeup, helping the Phillies earn their first postseason win since the 1993 World Series against Toronto.
The NL East champions were swept out of the first round by the surging Colorado Rockies last year. Hamels lost the opener of that series.
Making his second start since returning from surgery for a torn knee ligament, Milwaukee's Yovani Gallardo got rattled after his defense fell apart in the third.
The 22-year-old righty allowed three unearned runs and three hits in four innings, walking five. Gallardo became the second pitcher in major league history to start a postseason game without recording a win that year. He pitched in three games before he injured his right knee on May 1 and had a 1.88 ERA to go with four no-decisions.
Carlos Ruiz started Philadelphia's third inning with a single. Hamels then bunted hard to third baseman Bill Hall, who bobbled the ball, costing him a chance to get Ruiz at second. Second baseman Rickie Weeks dropped Hall's throw to first for an error.
Gallardo almost worked out of the jam, though. He retired Jimmy Rollins on a shallow fly and struck out Jayson Werth. But Utley ripped a liner through a swirling wind to center. Cameron took a poor route, raced back and reached up for a backhanded catch only to have the ball bounce out of his glove.
Both runners scored on Utley's double for a 2-0 lead. A three-time Gold Glove winner, Cameron usually makes that play look routine.
Gallardo intentionally walked Ryan Howard and then walked Pat Burrell to load the bases. Gallardo walked Shane Victorino to force in another run, before retiring Pedro Feliz on a fly to center.
Hamels, who didn't get much run support as he went 14-10 in the regular season, didn't need any more. The Phillies had just four hits.
Hart lined a single to right on an 0-2 pitch with two outs in the fifth for Milwaukee's first hit. Hamels pitched out of his only jam in the sixth. Craig Counsell singled with one out and Cameron walked. But Hamels fanned Hall on a down-and-away changeup and got Ryan Braun to pop out.
A sellout crowd of 45,929 at Citizens Bank Park withstood a steady rain for most of the game, waved their "Fightin' Phils" rally towels and savored a rare playoff victory.
This championship-starved city hasn't celebrated a title since the NBA's 76ers won it all in 1983.
The Brewers, in the postseason for the first time in 26 years, now turn to Sabathia. The burly left-hander almost single-handedly carried Milwaukee into the playoffs, going 11-2 with a 1.65 ERA after he was acquired July 7 from Cleveland. But Sabathia is just 2-2 with a 7.17 ERA in four postseason starts.
The Brewers haven't fared well in Philly this year. They were swept in a four-game series here three weeks ago. Manager Ned Yost was fired with 12 games remaining after that series and third-base coach Dale Sveum took over.
Milwaukee entered September with a 5½-game lead in the wild-card standings, but didn't clinch a spot until the New York Mets lost to Florida on the final day of the season.
Notes: Philadelphia's previous postseason win was a 2-0 victory over Toronto on Curt Schilling's five-hitter Oct. 21, 1993. The Blue Jays clinched the series on Joe Carter's homer off Mitch Williams in Game 6. ... Milwaukee's last postseason victory was against St. Louis on Oct. 17, 1982, in Game 5 of the World Series. The Brewers lost the next two games. ... Williams threw out the first pitch. Of course, "Wild Thing" tossed it way over the catcher's head. ... Burrell was in the lineup a day after he left a workout with back discomfort. He went 0-for-2 with a walk. ... Hamels had 11 starts this season in which he allowed three runs or less and didn't get a win.