José Hernández participated in Upward Bound during high school, a Federal TRIO program that prepares students for college. He graduated from Franklin High School in Stockton. While in college, he was involved in the Mathematics, Engineering, Science Achievement (MESA) program, an academic preparation program that provides support to students from educationally disadvantaged backgrounds so they can attain four-year degrees in science, technology, engineering or math (STEM) fields.

After three years and being turned down eleven times for astronaut training by NASA, Hernández was selected in May 2004.[12][13] In February 2006 he completed Astronaut Candidate Training that included scientific and technical briefings, intensive instruction in Shuttle and International Space Station systems, physiological training, T-38flight training, and water and wilderness survival training. On completing this initial training, Hernández was assigned to the Shuttle Branch to support Kennedy Space Center Operations in support of Shuttle launch and landing preparations.

Hernández worked various technical assignments until his selection on July 15, 2008, as a mission specialist on the STS-128 mission, which launched on August 28, 2009. While in orbit, Hernández became the first person to use the Spanish language in space while tweeting.[15][16][17][18][19]

Hernández told the Stockton Record in the summer of 2009 that he would consider running against fellow Democrat Dennis Cardoza in his Stockton-based district.[20]

Hernández announced at Pacific Union College on September 29, 2011, that at the urging of President Barack Obama he was considering a run for the U.S. House of Representatives and would announce his decision on October 11, 2011.[21] He announced his candidacy as promised on October 11 via Twitter[22] by linking to his campaign website.[23] Hernández made his first public campaign appearance on January 14, 2012, at a Democratic Candidate Forum in Tracy at the Holiday Inn Express & Suites.

In March 2012, Bell, McAndrews & Hiltachk, a law firm with links to the California Republican Party, sued in Sacramento County Superior Court to block Hernández from describing himself as an "astronaut/scientist/engineer" on the June ballot. The lawsuit stated that "astronaut is not a title one carries for life"; the election code requires the description be accurate for the previous calendar year.[24] "Allowing a candidate to use the profession of 'astronaut' when he hasn't served in that profession recently is akin to allowing someone to use a title of 'sailor' when they no longer own or operate a ship," said Jennifer Kerns, a California Republican Party spokeswoman. On March 29, a Sacramento County Superior Court judge ruled that Hernández may be described as an astronaut on the June 5 primary ballot.[25]

The payment of taxes were an issue for both Hernández and his opponent. Denham criticized Hernández for a tax lien of $10,813 imposed by the IRS in 2010 but only paid in 2012. In turn, Hernández attacked Denham for two tax liens imposed against his business in 2003.[26]

Hernández has received the endorsement of Democracy for America, and was selected as one of the Dean Dozen they were supporting in 2012. In November 2012, Hernández lost to the incumbent, Congressman Jeff Denham, in the General Election for California's new 10th District. Hernández finished in the polls with 46% of the vote.[27]

As of September 2012, most of Hernández's campaign funds came from outside his district and many donations came from left-wing political action committees and public employee unions. Speaking of his fundraising Hernández said, "there aren't any special interest groups that are going to come back and say I have to vote for something. I don't believe they're going to influence me in making decisions on what's best for my district." Hernández said that he does not think organizations like teachers unions to be special interest groups.[28]

Since his 2012 loss, Hernández has made multiple public statements regarding potential future campaigns. In March 2016, Hernández said, “I ran for Congress in 2012 but I lost in a close race. Now I’m thinking about making a comeback, maybe in 2018.”[4] In July 2017, Hernández was reportedly considering challenging Rep. Jerry McNerney in California’s 9th Congressional District, though he was still considering another run against Denham and wasn’t sure if he would run in 2018 or 2020.[5]

Hernández supports California's Proposition 30, a ballot measure proposed by Gov. Jerry Brown to increase income taxes on those earning more than $250,000 and raise the sales tax rate by a quarter-cent for everyone. To balance the federal budget, Hernández says there needs to be a combination of tax increases and budget cuts.[28]

Hernández is married and has five children. For several years, his wife, Adela, ran a Mexican restaurant just outside the Johnson Space Center gates, called Tierra Luna Grill, which is Spanish for Earth Moon Grill.[16][29] In 2014, Hernández joined the Board of Directors for the nonprofit humanitarian space agency, SpaceUnited.[30]