The Giants announced the signing on their website Sunday.
McGehee played in 30 games for the Tigers in 2016, posting a .228 batting average.
This will be McGehee's second stint in Japan. In 2013, he batted .292 with 28 home runs and 93 RBIs while helping the Rakuten Eagles of the Pacific League win the Japan Series.
The 34-year-old can play either first or third base.