In the 2025 Major League Baseball draft, Hernandez was the sixth overall pick and was selected by the Pittsburgh Pirates. He signed with Pittsburgh for a $7.25 million bonus on July 26, 2025, setting a record for the highest bonus ever given to a high-school pitcher.