The 6-foot-2, 246-pound James played for Dallas from 2003-10. He made more than 100 tackles in five straight seasons and led the Cowboys in tackles six times. He had 15 1/2 sacks, 10 forced fumbles, 12 recoveries and two interceptions in his nine seasons with the Cowboys.
The Texans needed to add depth at linebacker after trading DeMeco Ryans to Philadelphia.
James will be reunited with Texans defensive co-ordinator Wade Phillips, linebackers coach Reggie Herring and assistant linebackers coach Bobby King, who coached him in Dallas.
Dobbins played in 15 games last season, leading the team with nine special teams tackles and adding four tackles and a forced fumble on defence.