Charles Darwin, whose theory of natural selection inspired the phrase “survival of the fittest,” was, for much of his life, rather unfit. A mighty array of illnesses plagued Darwin for decades, including insomnia, eczema, and heart palpitations, but his most constant companions seem to have been anxiety and terrible gastric distress. During his lifetime, the origin of Darwin’s illnesses confounded twenty doctors, including his own father, a well-regarded physician.

In 1841, a 32-year-old Darwin wrote, “My father scarcely seems to expect that I shall become strong for some years; it has been a bitter mortification for me to digest the conclusion that the ‘race is for the strong’ and that I shall probably do little more but be content to admire the strides others made in science.”

It’s an understatement to say that his dark prediction was far from accurate. Darwin was much more than his maladies, but given all his ailments, it’s easy to see why he assumed he’d be relegated to the sidelines of science.

Even before boarding the H.M.S. Beagle for the around-the-world voyage that would inform of his theory of evolution, the 22-year-old naturalist showed signs of the ills that would ebb and flow throughout the rest of his life. In his autobiography, he recalls that the two months he spent waiting for the weather to clear before setting sail from Plymouth, England, in December 1831, “were the most miserable which I ever spent.”

“I was out of spirits at the thought of leaving all my family and friends for so long a time, and the weather seemed to me inexpressibly gloomy,” writes Darwin. “I was also troubled with palpitations and pain about the heart, and like many a young ignorant man, especially one with a smattering of medical knowledge, was convinced that I had heart-disease.”

Despite what some doctors now see as evidence of a panic disorder, he was determined to get on that ship. “I did not consult any doctor, as I fully expected to hear the verdict that I was not fit for the voyage, and I was resolved to go at all hazards,” he writes.

Other than some bouts with seasickness, he was mostly healthy during his nearly five-year voyage around the world. Unfortunately, upon his return to England, his health began to fail.

Ever the scientist, Darwin turned a keen eye to his own body’s behaviors. He chronicled these observations in letters to friends and family and in his “Diary of Health,” which he maintained from July 1, 1849, to January 16, 1855. In his book My Age of Anxiety, Scott Stossel notes that the diary “eventually ran to dozens of pages and listed such complaints as chronic fatigue, severe stomach pain and flatulence, frequent vomiting, dizziness (‘swimming head,’ as Darwin described it), trembling, insomnia, rashes, eczema, boils, heart palpitations and pain, and melancholy.”

When Darwin was 56, he reached out to Dr. John Chapman, a prominent specialist in “psychological medicine” for help. Stossel writes that at this point “Darwin had spent most of the past three decades—during which time he’d struggled heroically to write On the Origin of Species—housebound by general invalidism. Based on his diaries and letters, it’s fair to say he spent a full third of his daytime hours since the age of 28 either vomiting or lying in bed.”

In one particularly revealing letter to Chapman, Darwin gave a harrowing list of his symptoms:

“For 25 years extreme spasmodic daily & nightly flatulence: occasional vomiting, on two occasions prolonged during months. Vomiting preceded by shivering, hysterical crying[,] dying sensations or half-faint. & copious very pallid urine. Now vomiting & every passage of flatulence preceded by ringing of ears, treading on air & vision. … Nervousness when E [Emma, his wife] leaves me.”

Darwin’s illnesses stumped physicians then and they continue to perplex doctors now. Collectively, medical professionals have created a long list of diagnoses that includes “smouldering hepatitis,” malaria, duodenal ulcer, peptic ulcer, gout, “suppressed gout,” Chagas’ disease (a parasitic infection possibly contracted from a bug bite in Argentina), Crohn’s disease, arsenic poisoning, lupus, lactose intolerance, and an allergy to the pigeons he used in his research.

Stossel points out that although Darwin’s stomach issues were clearly debilitating, there may have been some benefit to his accompanying anxiety, citing research that shows that anxious people with high IQs tend to be better workers.

“From the high-strung can also come, at least some of the time, great science,” writes Stossel. “Dean Simonton, a psychologist at the University of California Davis, who has spent decades studying the psychology of genius, estimates that a third of all eminent scientists suffer from anxiety or depression or both. He surmises that the same cognitive or neurobiological mechanisms that predispose certain people to developing anxiety disorders also enhance the sort of creative thinking that produces conceptual breakthroughs in science.”

Despite being regularly laid low by his troublesome bowels, Darwin was a tenacious thinker. Even on days when he was too sick to sit at his desk for more than an hour or two, he still worked. Along with frequent references to his poor health, his letters also often celebrate his devotion to his scientific research.

Biographer John Bowlby observed that “work was constantly used by Darwin as a means of diverting his attention from his bodily discomforts and … from thoughts about whatever was causing him anxiety or depression.” In his mid-fifties, Darwin wrote to his cousin that work “is the only thing which makes life endurable to me,” and to another friend, “I have my hopes of again some day resuming scientific work, which is my sole enjoyment in life.”

His family recognized the upside of Darwin’s studies, too. When he was 51, his wife Emma wrote to a friend, “Charles is too much given to anxiety, as you know, and his various experiments this summer have been a great blessing to him.” And his son Leonard recalled that his father once said, “he was never quite comfortable except when utterly absorbed in his writing.”

“Even ill health, though it has annihilated several years of my life, has saved me from the distraction of society and its amusements,” wrote Darwin. As anxious as his illness left him, it kept him at home working, and may have actually helped Darwin become the father of modern biology and develop the revolutionary theory of evolution—no small strides by any measure.

As his son, Francis, wrote in The Life and Letters of Charles Darwin, “These two conditions—permanent ill-health and a passionate love of scientific work for its own sake—determined thus early in his career, the character of his whole future life. They impelled him to lead a retired life of constant labour, carried on to the utmost limits of his physical power, a life which signally falsified his melancholy prophecy.”