The deal includes base salaries of $840,000 (2013), $2 million (2014) and $2.66 million (2015).
Canty is due a $500,000 roster bonus on the fourth day of the 2014 league year.
He was released by the Giants in February. In 2009, the Giants signed Canty to a six-year, $42 million contract that included $17.25 million in guaranteed money.
He was limited to nine games last season due to a knee injury, recording 26 tackles and three sacks. For his career, the 6-foot-7, 320-pounder has 272 tackles and 19 sacks.
He's expected to provide more athleticism and power to the Ravens' front seven.
Ravens general manager Ozzie Newsome had indicated after the season that bolstering the middle of the defense was a major priority.
twitter.com/RavensInsiderCopyright © 2015, The Baltimore Sun