The Astros received Greene on Thursday for a player to be named or cash considerations.
The 28-year-old appeared in 77 games for the Cardinals this season, including 40 starts. A first-round draft pick in 2005, Greene is hitting .218 with four home runs and 19 RBIs.
Greene made an error at second base on Wednesday that led to two runs for the San Francisco Giants, who had a five-run sixth inning en route to a 15-0 win.
"I'm excited that he has a new opportunity," Cardinals manager Mike Matheny said. "It will be a good fit for him. I do believe that he will click for them."
Houston designated Triple-A shortstop Brian Bixler for assignment to make room on the 40-man roster for Greene.
The Astros will make a move on the 25-man roster when Greene reports to the team.