The deal will span two years, although additional details were not released.
It will be Bly's second tour with the Lions. The former Pro Bowler spent four years in Detroit (2003 to 2006), before being dealt to the Denver Broncos prior to the 2007 season.
But Bly's exodus wasn't necessarily on good terms, either.
He wasn't happy nor effective with Detroit's Tampa Two defensive scheme under Rod Marinelli from the beginning, and hurt his reputation after taking public shots at the team's quarterback, Joey Harrington, in 2005.
However, Bly did collect 19 interceptions in his stint with the Lions. And his playmaking, man-to-man style now fits what the team is attempting to accomplish defensively.
He had three interceptions last year in San Francisco.
"I feel like I played my best ball here in Detroit," Bly told the official Detroit Lions web site. "I feel like it's home and to come back and have the chance to finish my career where I played my best ball -– where I feel like I'm part of the community –- is a great feeling."
Bly could also be squeezed into the nickelback position.