The agreement between Hargreaves and the Texans was first reported Wednesday by the Houston Chronicle.
The Texans released Hargreaves on Feb. 14. Houston could have kept Hargreaves under his fifth-year option worth $9.6 million, but there was no dead money on the contract because the option was guaranteed for injury only before the start of the new league year.
Hargreaves initially joined the Texans in November after he was cut by the Tampa Bay Buccaneers after he was benched during a game.
Hargreaves, who turns 25 on June 3, was drafted by Tampa Bay with the No. 11 overall pick in 2016. In 41 career games, the Florida product has two interceptions, two forced fumbles, a fumble recovery and 186 tackles.