At school, he became a friend of Ramón Sijé, a well-educated boy who lent and recommended books to Hernández, and whose death would inspire his most famous poem, Elegy.
Hernández was born in Orihuela, Alicante, to a poor family and received little formal education; he published his first book of poetry at 23, and gained considerable fame before his death.
As a youth, Hernández greatly admired the Spanish Baroque lyric poet Luis de Góngora, who was an influence in his early works.
His death sentence, however, was commuted to a prison term of 30 years, leading to incarceration in multiple jails under extraordinarily harsh conditions.
While in prison, Hernández produced an extraordinary amount of poetry, much of it in the form of simple songs, which the poet collected in his papers and sent to his wife and others.
In July 2010 the poet's family filed a lawsuit in the Spanish Supreme Court in which they asked for his guilty verdict (for his supposed crime of left wing sympathies), to be annulled.
In March 2010 the family had a posthumous "declaration of reparation" from the Spanish government, but, his daughter-in-law Lucía Izquierdo said: "We want something more, that they void the death sentence.. that they hand down a ruling of innocent".
"He is a person with an impeccable past, generous sentiments and deep religious and humanist training, but whose excessive sensitivity and poetic temperament have led him to act in accordance with the passion of the moment rather than calm, firm will.