Dallas traded a 2015 sixth-round pick for McClain and Baltimore's 2015 seventh-round pick, a league source told ESPN NFL Insider Adam Schefter.
McClain was officially reinstated from the reserve/retired list Tuesday. To make room for his addition, the Cowboys placed linebacker Sean Lee on injured reserve. Lee suffered a torn ACL in May and was expected to miss the 2014 season.
McClain retired in April, telling ESPN.com in a text that he had lost his desire to play football. It was the second time he had retired, as he also called it quits in 2013. That was soon after he signed with the Ravens following his release by the Oakland Raiders, who had made him the No. 8 overall pick in the 2010 draft.
"I gotta follow my heart. It ain't football. If football made me complete I would play. But whenever I think of it my heart pulls me away from whatever reason. ... This means I'm done.
"Now I know God has something else planned for me and that my life is bigger than football," he said in the texts to ESPN The Magazine's Seth Wickersham.
McClain's agent, however, told ESPN.com's Todd Archer on Tuesday that the linebacker "sounds as excited about football as I've ever heard him."
"I see and Rolando sees the Dallas situation as a great opportunity given Sean's injury and you're talking about a great franchise and a great organization," Dye said. "I've described to any of the clients we've had through the years there, Emmitt Smith, Dexter Coakley, DeMarcus Ware, Marcus Spears, Keith Brooking, DeMarco Murray, that playing for the Cowboys in football is kind of like playing for the Yankees in baseball. Just an iconic franchise.
"With kind of what he's done going back to his time with the Raiders, I think that all of this has led him to a point where he feels like the game is too important to him to give up. He's just 24 years old. He's very talented. He's very bright. Tough. Competitive. There's a reason he was a top-10 pick at a position that is almost impossible to be a top-10 pick. Hopefully this situation will go smoothly."
McClain was suspended for two games by the Raiders in 2012 after arguing with head coach Dennis Allen. He was also arrested three times in an 11-month span.
In 41 games over three seasons with the Raiders, McClain had 246 tackles and 6.5 sacks.
ESPN.com Ravens reporter Jamison Hensley contributed to this report.
McClain Traded To Cowboys
Adam Caplan and Darren Woodson discuss Dallas' decision to trade for LB Rolando McClain, who will come out of retirement.