In 1875 one of William Ernest Henley's legs required amputation due to complications arising from tuberculosis. Immediately after the amputation he was told that his other leg would require a similar procedure. He chose instead to enlist the services of the distinguished surgeon Joseph Lister, who was able to save Henley's remaining leg after multiple surgical interventions on the foot. While recovering in the infirmary, he was moved to write the verses that became "Invictus". This period of his life, coupled with recollections of an impoverished childhood, were primary inspirations for the poem, and play a major role in its meaning.
During Mandela's 27 years of confinement Robben Island prison, he came to cherish Henley's poem, "Invictus." He often recited it to fellow inmates.
Mandela’s stay was frequently marred by demeaning and deplorable treatment. In spite of all ordeals, Mandela persevered. It is said that this poem helped keep his hope alive: When he lost courage, when he felt like just giving up — just lie down and not get up again — he would recite it. And it would give him what he needed to keep going.
This poem and Mandela's struggles became the subject of 2009 film 'Invictus' in which Morgan Freeman plays Mandela.