At first, it seemed that Kalanithi would overcome cancer. After all, he had never smoked, had been fairly fit until his diagnosis and had responded well to treatment. He even managed to return to operating on others, for up to 16 hours a day. That was thanks in large part to a new pill, Tarceva, which bears mentioning because of what befell him later.
His initial back pain, which sometimes had him screaming and curled up into a ball on the floor, had disappeared. He even put on weight.
But shortly after New York Times published his essay, he saw from his CT scan that his lungs was jam-packed with tumours, his spine was deformed and a chunk of his liver had been eaten away. The cancer had returned and it was terminal.
Cut at the knees in the prime of his life, his gauntlet was to live with two horrors: first, of knowing what any change in the light and shaded areas of his scans meant, as well as the agony to come; and second, of having to leave behind his wife. He had neglected her while he pursued a professorship in neurosurgery.
As he put it in his book: "I'd promised her one life and given her another."
Up till then, Kalanithi had been highly driven. But if you, like him, were a graduate of the universities of Stanford and Cambridge, a doctor trained at the Yale School of Medicine and winner of prestigious national research awards, you would likely rage against the dying of the light, as British poet Gerard Manley Hopkins had urged his father to do.
Cancer, which is Latin for crab, was "life-shattering" for Kalanithi and, despite support from his loved ones, his illness rendered him a "ghost" who was "torn between being a doctor and a patient" and would "wrestle" mentally with his oncologist, world cancer expert Emma Hayward, who refused to discuss how much time he had left.
When his cancer turned terminal, she gave in and told him he might have five years to live, as his tumours were slightly shrinking.
He lived another eight months, long enough to see his wife of eight years give birth to their daughter, Cady.
Throughout his ordeal, he was propelled by seven words from the Irish writer Samuel Beckett: "I can't go on. I'll go on."
After all, he mused in the book, life is about striving and failing to do that would be like "painting a tiger without stripes".
In his last months, everything tasted like seawater to him. He lost 6.8kg in one week and could barely lift his legs off the bed. Yet he managed to continue his day job relentlessly, at the end of which he was so exhausted that he had to take a nap in his car before driving the 15 minutes to reach home.
The heart of this book, though, has nothing to do with being debilitated by thoughts of death, which he considers "a tureen of tragedy to be allotted one spoonful at a time".
His sublimely elegant words are instead largely a quiet, yet devastating indictment of how callous the medical profession can sometimes be. For example, a young doctor-in-training named Brad left him, as he says, "unable to speak or swallow" and eventually in the intensive care unit, just because Brad, working the hospital's graveyard shift, could not be bothered to write out a prescription for Tarceva, which he considered troublesome because it was a special drug.
As Kalanithi recalled in the book: "If he could just push it off for a few more hours, I would become somebody else's problem."
The cautionary tale that is this book has all the more force because he reserves the harshest criticism for himself.
Midway through his memoir, he recalls how he was once "picking chocolate chips out of my teeth as the family said its last goodbyes" to his patient.
He had been enjoying an ice-cream sandwich - his usual dinner on the job - and had to let it melt because he had to attend to the patient.
He also caught himself thinking, "He had it coming" when a grumpy veteran of the Vietnam War had a wound that split because he went against doctors' advice.
Recalling that after he was stricken with cancer, Kalanithi wrote: "Nobody has it coming" and "I had made more moral slides than strides."
He had worked hard to see patients as people, not paperwork.
Yet, he was soon caught up in the day-to-day business of saving the lives of others and learnt that it was one thing to want the best for one's patients, but quite another to achieve it when one had to operate in "an endless jungle summer, wet with sweat, the rain of tears of the families of the dying pouring down".
In the end, reality trumped idealism for him.
"Being so close to the fiery light of such moments only blinded me to their nature, like trying to learn astronomy by staring directly at the sun."
You will likely cheer him for trying anyway and grieve for him as his musings are so frank and moving. But then, only his body is gone.
Thanks to his many gifts, his thoughts will be with humanity for a long while yet.
As the English bard John Donne once said: "All mankind is of one author, and is one volume; when one man dies, one chapter is not torn out of the book, but translated into a better language; and every chapter must be so translated."