Aoki is expected to play left field for the defending World Series champions, who have Hunter Pence in right field and Angel Pagan in center. His arrival allows Gregor Blanco to slot in as San Francisco's fourth outfielder.
Aoki's contract includes a club option for a second year that can become a mutual option based on playing time, the source said. Including incentives, Aoki has a chance to max out at $12.5 million over the 2015 and 2016 seasons.
Aoki, 33, is a .287 hitter with a .353 on-base percentage and 67 stolen bases in three seasons since coming to the major leagues from the Yakult Swallows in Japan. He spent his first two seasons in Milwaukee before the Brewers traded him to Kansas City for reliever Will Smith in December 2013.
The Cincinnati Reds, Baltimore Orioles and Atlanta Braves were among the other clubs that reportedly expressed interest in Aoki during the free-agent process. A source familiar with Aoki's search said geography and the ability to play for a contender ultimately helped sway him toward San Francisco.