Andrew McCutchen has played all nine years of his career with the Pirates.
In exchange for McCutchen, Pittsburgh will receive righthander Kyle Crick, minor league outfielder Bryan Reynolds and $500,000 in international bonus pool space.
McCutchen, 31, has spent all nine years of his MLB career with the Pirates. In 2013 McCutchen won NL MVP after hitting .317 with 21 home runs, 84 RBIs and stealing 27 bases.
For his career, McCutchen has a slash of .291/.379/.487 and 1,463 hits. Last season, McCutchen hit .279 and had 28 home runs, the second best mark of his career.
The Giants were last in the NL in home runs last season and 13th in batting average.
The Giants were one of the teams that was in talks with the Marlins to acquire Giancarlo Stanton before he was traded to the Yankees, but they did make a deal with the Rays in December to land third baseman Evan Longoria. The Pirates traded starting pitcher Gerrit Cole to the Astros Saturday.