The Giants face the heavily favored Philadelphia Phillies, who were looking for their third straight pennant. Behind two home runs by NLCS MVP Cody Ross and a strong start from Tim Lincecum, the Giants won game 1 4-3. The Phillies took game 2 6-1 before the series shifted to San Francisco for the next three games. Behind Matt Cain, the Giants won game 3 3-0 for a 2-1 series lead.
An exciting game 4 saw the Giants take an early 2-0 lead. After the Phillies scored four runs in the top of the fifth, the Giants got a run back on an Aubrey Huff single up the middle in the bottom of the fifth, which scored Andrés Torres. In the sixth inning, Pat Burrell drew a leadoff walk and advanced to third on a Cody Ross double. Pablo Sandoval came to the plate and appeared to double down the right field line, but the ball was called foul. Four pitches later, Sandoval lined a two-run double into the left-center field gap, scoring Burrell and Ross, and giving the Giants a 5–4 lead.
The Phillies tied it in the top of the eighth with back-to-back doubles by Ryan Howard and Jayson Werth. Giants reliever Sergio Romo recovered and retired the next three Phillies batters to strand Werth at second. Going to the ninth inning, the game was tied 5–5. In the top of the ninth, Giants closer Brian Wilson threw a 1-2-3 inning.
In the bottom of the ninth, Game 2 winner, Roy Oswalt was brought in as a reliever. Sanchez lined out to right field to start the inning, but Huff singled past a diving Howard immediately afterwards. Posey followed with a base hit to right—his fourth hit of the game—moving Huff to third with only one out. Juan Uribe, pinch hitting in the pitcher's spot, followed with a sacrifice fly to left field, allowing Huff to tag up and score the winning run. The victory gave the Giants a commanding 3–1 series lead.
With the Giants needing just one more victory to win the NL pennant and advance to the World Series, Lincecum got the start in game 5. Although the Giants scored first, the Phillies would win the game 4-2 to send the series back to Philadelphia.
Game 6 saw Jonathen Sanchez give up two early runs. But San Francisco rallied against Phillies starter Roy Oswalt in the third inning. Jonathen Sánchez singled and advanced to second base on a long fly ball from Andrés Torres that was dropped up against the center field wall by Shane Victorino. Freddy Sanchez bunted the runners over to second and third and Aubrey Huff hit a single up the middle, which only scored Sánchez as Torres was thrown out at home by Victorino. Huff took second base on the throw home and eventually scored on a throwing error by Placido Polanco to tie the game at 2–2. After Sanchez was removed by Bruce Bochy after hitting Chase Utley with a pitch and having control problems throughout the game to that point, Jeremy Affeldt replaced him and threw two perfect innings. The game stayed tied until the eighth inning, when Juan Uribe hit a solo home run for a 3-2 Giants lead.
Tim Lincecum, who was the Giants' starting pitcher in Games 1 and 5, then entered the game in a relief role to pitch the eighth inning. Lincecum struck out Werth, but gave up back-to-back singles to Shane Victorino and Raul Ibáñez. Giants manager Bruce Bochy promptly brought in closer Brian Wilson for a five-out save. Phillies catcher Carlos Ruiz hit a line drive right at Giants first baseman Huff, who caught the ball and easily doubled off Victorino at second to get out of the inning.
Wilson got pinch hitter Ross Gload to ground out to start the bottom of the ninth, but then walked Jimmy Rollins to put the tying run on base. Placido Polanco grounded into a fielder's choice, and Rollins was thrown out at second. Chase Utley then drew a walk, which put the winning run on base. With a full count and the runners moving on the pitch, Wilson struck Ryan Howard out looking to end the game and send the Giants to the World Series.