When faced with a terminal illness, medical professionals, who know the limits of modern medicine, often opt out of life-prolonging treatment. An American doctor explains why the best death can be the least medicated – and the art of dying peacefully, at home

Years ago, Charlie, a highly respected orthopaedist and a mentor of mine, found a lump in his stomach. He asked a surgeon to explore the area, and the diagnosis was pancreatic cancer. This surgeon was one of the best in the country. He had even invented a new procedure for this exact cancer that could triple a patient's five-year-survival odds – from five per cent to 15% – albeit with a poor quality of life. Charlie was uninterested. He went home the next day, closed his practice, and never set foot in a hospital again. He focused on spending time with his family and feeling as good as possible. Several months later, he died at home. He received no chemotherapy, radiation, or surgical treatment. Medicare didn't spend much on him.

It's not a frequent topic of discussion, but doctors die, too. And they don't die like the rest of us. What's unusual about them is not how much treatment they get compared to most Americans, but how little. For all the time they spend fending off the deaths of others, they tend to be fairly serene when faced with death themselves. They know exactly what is going to happen, they know the choices, and they generally have access to any sort of medical care they could want. But they go gently.

Of course, doctors don't want to die; they want to live. But they know enough about modern medicine to know its limits. And they know enough about death to know what all people fear most: dying in pain, and dying alone. They've talked about this with their families. They want to be sure, when the time comes, that no heroic measures will happen – that they will never experience, during their last moments on earth, someone breaking their ribs in an attempt to resuscitate them with CPR (that's what happens if CPR is done right).

Almost all medical professionals have seen what we call "futile care" being performed on people. That's when doctors bring the cutting edge of technology to bear on a grievously ill person near the end of life. The patient will be cut open, perforated with tubes, hooked up to machines, and assaulted with drugs. All of this occurs in the intensive care unit at a cost of tens of thousands of dollars a day. What it buys is misery we would not inflict on a terrorist. I cannot count the number of times fellow physicians have told me, in words that vary only slightly: "Promise me that if you find me like this you'll kill me." They mean it. Some medical personnel wear medallions stamped "NO CODE" to tell physicians not to perform CPR on them. I have even seen it as a tattoo.

To administer medical care that makes people suffer is anguishing. Physicians are trained to gather information without revealing any of their own feelings, but in private, among fellow doctors, they'll vent. "How can anyone do that to their family members?" they'll ask. I suspect it's one reason physicians have higher rates of alcohol abuse and depression than professionals in most other fields. I know it's one reason I stopped participating in hospital care for the last 10 years of my practice.

How has it come to this – that doctors administer so much care that they wouldn't want for themselves? The simple, or not-so-simple, answer is this: patients, doctors, and the system.

To see how patients play a role, imagine a scenario in which someone has lost consciousness and been admitted to hospital. As is so often the case, no one has made a plan for this situation, and shocked and scared family members find themselves caught up in a maze of choices. They're overwhelmed. When doctors ask if they want "everything" done, they answer yes. Then the nightmare begins. Sometimes, a family really means "do everything," but often they just mean "do everything that's reasonable". For their part, doctors told to do "everything" will do it, whether it is reasonable or not.

That scenario is a common one. Feeding into the problem are unrealistic expectations of what doctors can accomplish. Many people think of CPR as a reliable lifesaver when, in fact, the results are usually poor. I've had hundreds of people brought to me after getting CPR. Exactly one, a healthy man who'd had no heart troubles (for those who want specifics, he had a "tension pneumothorax"), walked out of the hospital. If a patient suffers from severe illness, old age, or a terminal disease, the odds of a good outcome from CPR are infinitesimal, while the odds of suffering are overwhelming. But, of course, doctors play an enabling role here, too. The trouble is that even doctors who hate to administer futile care must find a way to address the wishes of patients and families. Imagine, once again, the A&E ward with those grieving, possibly hysterical, family members. They do not know the doctor. Establishing trust and confidence under such circumstances is a very delicate thing. People are prepared to think the doctor is acting out of base motives, trying to save time, or money, or effort, especially if the doctor is advising against further treatment.

Some doctors are stronger communicators than others, and some doctors are more adamant, but the pressures they all face are similar. When I faced circumstances involving end-of-life choices, I adopted the approach of laying out only the options that I thought were reasonable (as I would in any situation) as early in the process as possible. When patients or families brought up unreasonable choices, I would discuss the issue in layman's terms that portrayed the downsides clearly. If patients or families still insisted on treatments I considered pointless or harmful, I would offer to transfer their care to another doctor or hospital.

Should I have been more forceful at times? I know that some of those transfers still haunt me. One of the patients of whom I was most fond was a lawyer from a famous political family. She had severe diabetes and terrible circulation, and, at one point, she developed a painful sore on her foot. Knowing the hazards of hospitals, I did everything I could to keep her from resorting to surgery. Still, she sought out outside experts with whom I had no relationship. Not knowing as much about her as I did, they decided to perform bypass surgery on her chronically clogged blood vessels in both legs. This didn't restore her circulation, and the surgical wounds wouldn't heal. Her feet became gangrenous, and she endured bilateral leg amputations. Two weeks later, in the famous medical centre in which all this had occurred, she died.

It's easy to find fault with both doctors and patients in such stories, but in many ways all the parties are victims of a larger system that encourages excessive treatment. Many doctors are fearful of litigation and do whatever they're asked to avoid getting in trouble. Even when the right preparations have been made, the system can still swallow people up. One of my patients was a man named Jack, a 78-year-old who had been ill for years and undergone about 15 major surgical procedures. He explained to me that he never, under any circumstances, wanted to be placed on life support machines again. One Saturday, however, Jack suffered a massive stroke and was admitted to A&E unconscious, without his wife. Doctors did everything possible to resuscitate him and put him on life support. This was Jack's worst nightmare. When I arrived at the hospital and took over Jack's care, I spoke to his wife and to hospital staff, bringing in my office notes with his care preferences. Then I turned off the life support machines and sat with him. He died two hours later.

Even with all his wishes documented, Jack hadn't died as he'd hoped. The system had intervened. One of the nurses, I later found out, even reported my unplugging of Jack to the authorities as a possible homicide. Nothing came of it, of course; Jack's wishes had been spelled out explicitly, and he'd left the paperwork to prove it. But the prospect of a police investigation is terrifying for any physician. I could far more easily have left Jack on life support against his stated wishes, prolonging his life, and his suffering, a few more weeks. I would even have made a little more money, and Medicare would have ended up with an additional $500,000 (£314,500) bill. It's no wonder many doctors err on the side of over-treatment.

But doctors still don't over-treat themselves. Almost anyone can find a way to die in peace at home, and pain can be managed better than ever. Hospice care, which focuses on providing terminally ill patients with comfort and dignity rather than on futile cures, provides most people with much better final days. Amazingly, studies have found that people placed in hospice care often live longer than people with the same disease who are seeking active cures.

Several years ago, my older cousin Torch (born at home by the light of a flashlight) had a seizure that turned out to be the result of lung cancer that had gone to his brain. I arranged for him to see various specialists, and we learned that with aggressive treatment of his condition, including three to five hospital visits a week for chemotherapy, he would live perhaps four months. Ultimately, Torch decided against any treatment and simply took pills for brain swelling. He moved in with me.

We spent the next eight months having fun together like we hadn't had in decades. We went to Disneyland, his first time. We'd hang out at home. Torch was a sport nut, and he was very happy to watch sport and eat my cooking. He even gained a bit of weight, eating his favourite foods rather than hospital food. He had no serious pain, and he remained high-spirited. One day, he didn't wake up. He spent the next three days in a coma-like sleep and then died. The cost of his medical care for those eight months, for the one drug he was taking, was about $20.

Torch was no doctor, but he knew he wanted a life of quality, not just quantity. Don't most of us? If there is a state-of-the-art of end-of-life care, it is this: death with dignity. As for me, my physician has my choices. There will be no heroics, and I will go gentle into that good night.

• Ken Murray, MD, is a former clinical assistant professor of family medicine at USC. Taken from an article originally published at Zócalo Public Square.