The Eagles and Texans also announced Tuesday they were swapping third-round choices in 2012. The Eagles now have the 89th pick overall, while the Texans have the 77th pick.
The 27-year-old linebacker and team captain leaves Houston as the Texans' all-time leader with 637 tackles while also contributing eight sacks, six forced fumbles, eight fumble recoveries and two interceptions in his six-year career. He earned Pro Bowl honors following the 2007 and 2009 campaigns and was an Associated Press All-Pro selection in 2007.
Ryans missed most of the 2010 season after tearing his left Achilles' tendon.
"DeMeco is a proven Pro Bowl linebacker in this league and we're excited to be able to plug him into the middle of our defense," Eagles coach Andy Reid said. "He's been the signal caller and a leader on a very good Texans defense for the last several years. He's a tough, instinctive football player and he'll be a great fit for our team."
Ryans was a second-round draft pick by the Texans in 2006, the same year the team took Mario Williams with the top overall pick. Ryans made the bigger initial impact of the two stars, making 156 tackles to earn the Associated Press Defensive Rookie of the Year honor.
He was also durable, starting all 16 games in his first four seasons. He tore his left Achilles tendon in the sixth game of 2010 and the season collapsed, with the Texans dropping eight of their final 10 games.
Houston used most of its 2011 draft picks on defensive players, and Ryans had a reduced role because of more injuries and the emergence of Brian Cushing and rookie Brooks Reed.
The Texans ranked second in total defense last season (285.7 yards per game), finished 10-6 and earned their first division title and playoff berth. But they lost key players in free agency, including Williams, right tackle Eric Winston and right guard Mike Brisiel and now Ryans, the team's union representative.
Dealing Ryans left some of the remaining players wondering about the team's direction. Defensive ends Antonio Smith and J.J. Watt talked about losing Ryans on the NFL Network on Wednesday night.
"It's a big surprise to me," Smith said. "I don't know what is going on at this moment, but DeMeco is a great player, a leader. He's going to be an asset to each and every team he plays for. Our defense is going to miss him.
"That's all I can say about it."
Watt, Houston's first-round draft pick last year, said Ryans was "the most respected guy on the defense, our leader."
"He's a guy that everybody turns to, especially when things are going tough," Watt said. "It's tough to see him go, but at the end of the day, what can we do? He's obviously going to go play great football for the Eagles. Now it's time for the rest of us, as a defense, to step up and find a new leader and go out there and play football. We can't do anything about that, so it's time for us to go out there and do it on our own."
Ryans played collegiately at Alabama, where he earned first-team All-America honors in 2005. He was a teammate of Eagles left guard Evan Mathis with the Crimson Tide. While in the NFL, Ryans has been a leader on and off the field and his work in the community has been highly regarded in the Houston area.
"We appreciate all the hard work and effort DeMeco invested in our organization and wish him only the best moving forward," Texans general manager Rick Smith said. "He is a class act."
AP Sports Writer Chris Duncan in Houston contributed to this story.