Williams, 35, spent the past eight seasons with the Cincinnati Bengals, starting all 118 games in which he played. Originally selected by the Philadelphia Eagles in the second round of the 2000 NFL Draft, he has played in 151 career games, including 130 starts.
Last season, the 6-foot-4, 345-pound Williams started in each of the nine contests he played. He was placed on injured reserve on Dec. 12 with an ankle injury.
"Bobbie is a guy who has been in the league for a long time," coach John Harbaugh said. "We've played against him, and we like his style of play and his demeanor as a person and as a player. We're excited to have him as a member of our team."