The poet was arrested multiple times after the Spanish Civil War for his republican sympathies, and eventually sentenced to death. His death sentence, however, was commuted for 30 years, leaving the poet to live in multiple jails under extraordinarily harsh conditions until eventually succumbing to tuberculosis in 1942.
While in jail, the poet produced an extraordinary amount of poetry, much of it in the form of simple songs, which he collected in his papers and sent to his wife and others. These poems are now known as his Cancionero y romancero de ausencia (Songs and Ballads of Absence). In these works, the poet writes not only of the tragedy of the Spanish Civil War and his own incarceration, but also of the death of an infant son and the struggle of his wife and another son to survive in poverty. The intensity and simplicity of the poems, combined with the extraordinary situation of the poet, give them remarkable power.
Perhaps the best known work of the poet is a poem called "Nanas de cebolla" ("Onion Lullaby"), a poem in which Hernández replies to his wife's letter telling him that she had nothing but bread and onions to live on. In the poem, the poet envisions his son breastfeeding on his mother's onion blood (sangre de cebolla), and uses the child's laughter as a counterpoint to the mother's desperation. In this as in other poems, the poet turns his wife's body into a mythic symbol of desperation and hope, of regenerative power desperately needed in a broken Spain.
The poet's works include: