The team announced the deal Wednesday. Bush had reached agreement Saturday after his visit to team headquarters and Levi's Stadium last Wednesday.
Bush played in only 11 games with nine starts last season for the Lions because of injuries, including an ankle issue. He carried 76 times for 297 yards and two touchdowns.
The 30-year-old Bush joins a Niners team that lost franchise rushing leader Frank Gore in free agency to the Colts, among other departures that include the surprising retirements of linebackers Patrick Willis and Chris Borland.
AP NFL website: www.pro32.ap.org and http://twitter.com/AP-NFL