Hernandez was born in San Francisco, and grew up in Pacifica and Millbrae, California. He attended Terra Nova High School in Pacifica during his freshman year, then transferred to Capuchino High School in San Bruno for the remainder of his high school years. Hernandez was a star athlete in high school and graduated in 1971. One of his teammates at Terra Nova High School was a future major league pitcher Bob McClure, who had also played Little League baseball with him when they were younger. Given his surname, and the fact that he is from California, it was incorrectly assumed that Hernandez was of Mexican descent, and he was nicknamed Mex by his teammates. In actuality, his father's ancestry is Castilian Spanish and his mother is Scots-Irish, as he explained during a Mets broadcast on SNY.