On November 17, 2008, Affeldt signed a two–year deal with the San Francisco Giants. He said of signing with them, "With that starting rotation, the bullpen won't get burned out." Affeldt immediately began having a career year with the Giants. He was used on Opening Day against the Milwaukee Brewers, and he pitched a scoreless inning in the Giants' 10–6 win. On April 12, he entered a game against the Padres with one out and the bases loaded in the sixth inning. Affeldt got Brian Giles to ground into a double play to end the inning, but he gave up two runs (one earned) in the seventh as the Padres won 6–1.