Leinart will take a physical, sign the contract and join the team Monday. Agent Tom Condon confirmed the agreement in a phone interview with The Associated Press.
"It's been kind of crazy, a whirlwind, but I'm excited to be here," Leinart told KRIV-TV in Houston.
Leinart said he's looking forward to working with Texans coach Gary Kubiak, who has a reputation for developing quarterbacks.
"I am really excited to work with Gary," Leinart told KRIV. "His résumé with quarterbacks and what he's done with Matt [Schaub] is really intriguing. Matt is a great quarterback to learn from and I'm really looking forward to it."
Leinart's deal with the Texans was first reported by ESPN senior NFL analyst Chris Mortensen.
After his release Saturday, Leinart found little interest from the rest of the NFL's 31 teams, sources told Mortensen.
Leinart will become the Texans' third quarterback behind Schaub, the starter, and backup Dan Orlovsky, who will remain the No. 2 at least until Leinart has some command of Houston's offensive scheme, the sources said.
The Texans cut John David Booty, another former USC quarterback, when they trimmed their roster to the mandatory 53-man limit on Saturday, leaving Schaub and Orlovsky as their top two quarterbacks. Orlovsky threw two interceptions against the Buccaneers in the final preseason game but Kubiak otherwise described the Texans' backup as having a "strong" training camp.
Kubiak said he was excited to add Leinart to his stable of quarterbacks.
"You don't count on a player like that being available," Kubiak told KRIV. "We are very fortunate. Matt fits what we do."
Leinart will be working with some of the NFL's best receiving talent, including All-Pro Andre Johnson. Leinart, who was released Saturday, also had great receivers in Arizona, led by All-Pro Larry Fitzgerald.
Leinart's financial terms for 2010 were not immediately available.
The Cardinals parted ways with the former Heisman Trophy winner days after Leinart went public with his frustration over being replaced by Cleveland castoff Derek Anderson.
Leinart complained he had outplayed Anderson and that his problems with coach Ken Whisenhunt were "probably away from football."
That led to a meeting with Whisenhunt the following day. Although he was unhappy that Leinart took his issues public, Whisenhunt praised how the quarterback handled things.
"The one thing I want to make very clear is how professional Matt was about the whole situation," the coach said. "I was very impressed with his conversation with me. He thanked the organization, the ownership, for all the time and effort that they had invested in him. He felt like he had gotten better and he had learned a lot and it meant a lot to me to hear him say that."
Arizona thought it had a steal when Leinart, who led Southern California to two national championships and a third title game appearance, fell to the Cardinals at the No. 10 overall pick in 2006. He started 11 games as a rookie under then-coach Dennis Green, then the first five the following season under new coach Ken Whisenhunt. But the big left-hander went down with a broken collarbone and Kurt Warner took over.
Warner finished his career with two spectacular seasons, leading Arizona to consecutive NFC West titles, an incredible run to the Super Bowl and a 51-45 overtime victory over Green Bay in a playoff thriller last season.
Leinart threw for 3,893 yards with 14 touchdowns and 20 interceptions with Arizona.
He's eager to prove that he belongs in the NFL now that he's received a second chance with the Texans.
"I know I can play," Leinart told KRIV. "I know I can have success in this league. I know I am not going to be handed anything. I've been in the same [offensive] system the last four years and now I'm excited to be a part of a new one."
Information from ESPN senior NFL analyst Chris Mortensen and The Associated Press was used in this report.