Hernandez won an American League Cy Young Award, two ERA titles and made six All-Star teams over 15 seasons with the Seattle Mariners before becoming a free agent last offseason.
The 34-year-old signed a minor league deal with Atlanta and looked sharp during spring training, but he ultimately opted out of the pandemic-shortened 60-game season.
In his most recent big league action, Hernandez went 1-8 with a 6.40 ERA in 2019. He hasn't finished with an ERA under 4.00 since 2016, and his last All-Star appearance was in 2015. He has won 169 games and owns a 3.42 career ERA.
Hernandez could earn a rotation spot with the rebuilding Orioles, who have 2019 All-Star left-hander John Means locked in as a starter but not much else. They traded Alex Cobb to the Los Angeles Angels on Tuesday, leaving Keegan Akin, Dean Kremer, Jorge Lopez, Wade LeBlanc, Thomas Eshelman and Bruce Zimmermann as the only returning players to start at least one game in 2020.
Baltimore also announced Wednesday it has agreed to minor league deals with infielders Seth Mejias-Brean and Malquin Canelo, right-handers Dusten Knight, Konner Wade and Spenser Watkins, and left-hander LeBlanc.