General manager Jeff Luhnow made the announcement Friday. The 37-year-old Hernandez made five starts for the Astros in spring training after signing with the club on Jan. 31.
Hernandez had hoped to pitch for a 17th season with his eighth different team. He has started 474 games and has pitched 3,121 2-3 innings. He was the opening-day starter for Washington last season and went 8-13 with a 4.47 ERA in 29 starts.
The Cuban defector has pitched at least 200 innings in 10 major-league seasons, and led the NL in innings pitched between 2003-05.
Hernandez is a two-time All Star and helped Florida won the 1997 World Series. He also spent time with San Francisco, Montreal, Arizona, Minnesota, Colorado and the New York Mets before re-signing with the Expos/Nationals in 2009.
Hernandez has a career record of 174-176 with a 4.39 ERA. He's pitched in 12 playoff games with a 7-3 record and 3.97 ERA.
Astros release Duke, Cust earlier this week
The Houston Astros released pitcher Zach Duke and veteran hitter Jack Cust on Tuesday.
The 28-year-old Duke was an All-Star left-hander for the Pittsburgh Pirates in 2009. He appeared in four games this spring, giving up 25 hits including five home runs in 14 1/3 innings. After pitching for the Arizona Diamondbacks last season, Duke had signed a minor league contract with Houston.
The 32-year-old Cust has 105 major league home runs, 84 of them for the Oakland Athletics between 2007 and 2009. He had an elbow injury this spring and hit 1-for-25 in 11 games.
The Astros have 39 players left in their major league camp, including 18 pitchers.