McKinnie took and passed a physical for the Ravens on Wednesday. In a statement released after he signed his contract, McKinnie said, "I am honored and excited to embark on this new chapter within my life."
The deal can be worth up to $7.5 million and includes a $1 million signing bonus, a source familiar with the deal told ESPN NFL Insider Adam Schefter.
McKinnie was cut in training camp by the Minnesota Vikings after he reported overweight. He played nine seasons for the Vikings, starting in 131 games.
"He's been a productive player at one of the hardest positions to play and he has been in sync with Matt Birk when Matt was a Viking," Ravens general manager Ozzie Newsome told the team's official website.
It is uncertain whether McKinnie will play on the right or left side with Baltimore. Michael Oher played left tackle last season, and this summer the right side has been handled by rookie Jah Reid and veteran Mark LeVoir.
Either way, McKinnie could end up being a starter if he passes Wednesday's physical.
Ravens linebacker Ray Lewis says McKinnie "will make us better."
McKinnie wrote on Twitter: "I'm out on the 1st flight smoking 2morrow am. Let's Get it!"
The Vikings drafted McKinnie out of Miami in 2002, picturing him as the next great left tackle in the NFL. He held out for half of his rookie season, but immediately stepped in as the starter after signing his contract.
Incredibly agile for a guy who is 6-foot-8 and over 340 pounds, he helped make things easier for Minnesota running back Adrian Peterson and was partially responsible for six of the top eight rushing seasons in franchise history.
He was voted to the Pro Bowl after the 2009 season, but he did not show up for practices and was scratched from the game, eventually having to pay back almost $5,000 in travel expenses to the league.
Last season he appeared to regress during a 6-10 year, and he admitted to being a little too heavy by season's end. He vowed to work hard in the offseason and return in top physical condition, but the lockout prevented him from staying in touch with coaches and doing any work at the team's facility in Minnesota.
He stayed at his home in Miami most of the offseason, working on his budding music career and tweeting prolifically about his social life on South Beach.
Information from The Associated Press contributed to this report.