The 49ers announced the deal Tuesday.
San Francisco selected Lloyd in the fourth round of the 2003 draft. He was a member of the 49ers from 2003-05, when he caught 105 passes for 1,510 yards and 13 touchdowns. That including leading the team with 48 receptions, 733 yards receiving and five TD catches in 2005.
Lloyd has also played for the Washington Redskins (2006-07), Chicago Bears (2008), Denver Broncos (2009-11), St. Louis Rams (2011) and New England Patriots (2012) during his career before sitting out last season.