If I have learned anything about nonfiction writing, it is that the challenge is not in finding a great story to tell. More often than not, real life is so rich, complex and unpredictable that it would seem completely implausible in the pages of a novel. The difficulty lies in understanding the people you are writing about — not their actions, or even their thoughts, but their deepest character. It is not the famous events, the dramatic moments of public triumph, that define them. It is when their lives are difficult, even desperate, that their true nature is revealed. In those private moments, even the greatest men become understandable because those painful emotions are a universal part of human life — something that all of us, sooner or later, must face.

When I began work on my first book, “The River of Doubt,” which tells the story of Theodore Roosevelt’s 1914 descent of an unmapped river in the Amazon rainforest, I thought of it as a tale of adventure, exploration and extraordinary courage. I did what I could to understand what Roosevelt and his men had endured on an expedition so extreme that it resulted in the deaths of three men and Roosevelt’s near suicide. I traveled through the Brazilian Amazon on the remote, rapids-choked river that was once the Rio da Duvida, the River of Doubt, and is now the Rio Roosevelt, and I tracked down the isolated tribe that shadowed Roosevelt and his men throughout their months-long ordeal. More difficult to understand, and more fascinating than the flesh-eating fish, the cannibalistic tribesmen or even the impenetrable rainforest, however, was Roosevelt himself.

The more I learned about this expedition, the more apparent it became that it was much more than a story of adventure. Perhaps more than any other event in Roosevelt’s life, it revealed the man he was. After injuring his leg in the river and falling desperately ill, he began to see that he was not just a burden but a danger to the other men in the expedition, a small group that included one of his sons. At that moment, Theodore Roosevelt was not, as we usually think of him, a statesman, a soldier or a cowboy but simply a father who was terrified of losing his son. He had brought with him a lethal dose of morphine, and he told his sonthat he had decided to take his own life. “You can get out,” he said. “I will stop here.”

I had always found Roosevelt’s wrenching decision, which is one of the least known moments in an extraordinarily well-documented life, deeply moving. It was not until my own life took a sudden and terrifying turn, however, that I think I truly understood it. One day in the summer of 2005, when I was working on “The River of Doubt” and expecting my second child, I was surprised by a phone call from my doctor. Her technician had seen something suspicious in my last sonogram, and she wanted to take a closer look. By the next morning, my daughter would be born by emergency Cesarean section, and our family would be thrust into a pitched battle to save her from a rare form of childhood cancer. In the space of a day, our lives changed profoundly. Entirely against my will, I believe I finally understood for the first time the deeper personal story that had unfolded on that distant river.

Over the years I had spent writing “The River of Doubt,” Roosevelt’s story had taught me that no life is immune to tragedy. Well before he had traveled to the Amazon, he had experienced as much grief in his life as great achievement. He had endured the painful death of a father whom he adored; the deaths, on the same day, of his mother and first wife; and a stunning and deeply humiliating defeat in his attempt to regain the presidency in the election of 1912. Each time, he had responded by fighting back, throwing himself into extreme physical challenges that tested his strength and his courage and helped him forget.

Candice Millard

Over the next two years, I came to understand Roosevelt’s relentless approach to loss much more through my daughter’s life than I ever could have simply by studying his. As I sat in a seemingly endless series of hospital rooms, surrounded by blinking lights and beeping machines while my daughter endured eight rounds of chemotherapy, I realized that I was less interested in Roosevelt’s accomplishments than in his struggles. It was when he was taken by surprise, when he suddenly found himself searching for a foothold, that I could see him most clearly.

By the time I began work on my second book, “Destiny of the Republic,” which is about the assassination of President James Garfield, our daughter had fought her way back from her harsh introduction to life and was in remission. As I began my research, however, I was continually surprised by how close to the surface my own fears still lay. Garfield, who was only 49 years old when he was shot in a Washington train station by a deranged man, would have lived had it not been for the arrogance and willful ignorance of his own doctors. Every time I read one of the medical reports — sickening descriptions of Garfield’s doctors probing the wound in his back with unsterilized fingers and instruments, blindly searching for the bullet — or found an anguished letter or diary entry written by his wife or children, their desperation felt remarkably familiar.

Perhaps no one seemed to capture my feelings as well as Garfield himself, a supremely insightful thinker who often seemed to be explaining my life to me, even as I was attempting to explain his life to others. “I have sometimes thought that we cannot know any man thoroughly well while he is in perfect health,” Garfield wrote. “As the ebb-tide discloses the real lines of the shore and the bed of the sea, so feebleness, sickness, and pain bring out the real character of a man.”

If uncovering the truth is the greatest challenge of nonfiction writing, it is also the greatest reward. As I have encountered difficult moments in my own life, I have been privileged to learn from the great men I have come to know as a writer. In their moments of private agony and doubt, which we all share, we can see through to the depths of their character — to the bed of the sea — and begin to understand.