McClain's deal is expected to have a $700,000 base salary and include $400,000 in incentives based on playing time, according to a source.
McClain, Oakland's former first-round pick, starred at Alabama, the alma mater of Ravens general manager Ozzie Newsome.
"It's a move that can't go wrong and I'm looking forward to playing in Baltimore as the Ravens run the same or very similar defense as I was a part of at the University of Alabama," McClain told the Madison (Ala.) Weekly News earlier this week.
"Ray Lewis retired after winning the Super Bowl and I look to fill his slot," McClain told the newspaper. "No one can fill his shoes, but I can fill his slot. I just want to fill out the shoes of Rolando McClain. This is a perfect fit for me personally."
McClain becomes the second player cut by the Raiders this offseason to sign with the Super Bowl champion Ravens. Safety Michael Huff signed with Baltimore last month.
McClain last week became the third player drafted in the top 10 by late owner Al Davis to be let go so far this offseason by second-year Raiders general manager Reggie McKenzie. Huff (seventh pick in 2006) and receiver Darrius Heyward-Bey (seventh pick in '09) were cut last month.
McClain had a rough final campaign in Oakland, serving a two-game suspension last season for conduct detrimental to the team. He also was demoted from the starting lineup a month into the season because of his struggles in pass coverage and because Raiders coaches thought he tired too much playing every down.
In 41 career games with Oakland, McClain had 6.5 sacks, one interception, one forced fumble and no fumble recoveries, and he did little to help improve Oakland's struggling run defense.
McClain also had problems off the field. He was involved in a shooting in Alabama in November 2011 when he left the team briefly during the season to attend a family funeral. McClain had been convicted of four misdemeanors in May, but he appealed the verdict and the charges were dropped when the accuser told prosecutors he no longer wanted to pursue the case.
Information from ESPN's Ed Werder and The Associated Press was used in this report.