The central idea of the poem is the resilience of the human spirit in the face of extreme personal torment.
To start, the poem has an interesting title, Invictus. This Latin word is translated as unconquerable or invincible. During Henley's childhood years, he was diagnosed with tuberculosis of the bone, which essentially caused him to lose his left leg below the knee. In 1873, when his right leg also became infected, Henley was put under the care of Dr. Joseph Lister, who later came to be known as the father of antiseptic surgery. It was Dr. Lister who pioneered the practice of sterilizing surgical instruments and spraying carbolic acid in operating rooms to limit the spread of infection. His methods were revolutionary, and under his care, Henley's right leg was saved from amputation.
Henley stayed under Dr. Lister's care for two years at the Edinburgh Infirmary. During this time, the poet wrote Invictus and other poems. In his poems, Henley paid tribute to the human spirit and to the power of courage. In the first stanza of Invictus, he thanks "whatever gods may be" for his "unconquerable soul." Here, Henley acknowledges that personal courage often depends upon faith in a higher power. He does not name a particular god, leaving it up to his readers to relate his words to their own personal experiences.
In the second stanza, he tells us that he has not once "winced nor cried aloud" when burdened with extreme suffering. His "head is bloody, but unbowed"; his stoic proclamation is one of the most famous lines in poetry. Henley pays tribute to all those who refuse to surrender to defeat despite seemingly insurmountable odds.
In the third stanza, Henley maintains that he's ready for whatever challenges he needs to face, whether here on earth or in the afterlife. He's as unafraid of the "Horror of the shade" as he is of an earth full of "wrath and tears." It isn't quite clear what "Horror of the shade" refers to; Henley leaves the meaning obscured, but we can speculate that the phrase refers to what awaits someone in the afterlife. Since there is no clear consensus evidencing what the afterlife is really like, Henley is perhaps suggesting that the afterlife may prove as much of a challenge as life on earth.
In the fourth and last stanza, Henley assures his readers that no matter what comes, he's the master of his fate and the captain of his soul. Instead of relying on circumstances to define his responses and attitude, he submits that he will be the one to decide his destiny. In short, the central idea of the poem is about the power of the human spirit to overcome despondency and defeat in the midst of extreme trial.