Dr. Michael Palmer, a physician who began writing tightly plotted thrillers at his kitchen table in 1978 to escape the inner chaos of alcohol and drug addiction, in the process finding a worldwide audience (and sobriety) as the author of top sellers like “Extreme Measures” and “Natural Causes,” died on Oct. 30 in Queens. He was 71.

Dr. Palmer had a heart attack the previous day while going through customs at Kennedy International Airport. He was on his way home to Swampscott, Mass., from an African safari vacation, said Jennifer Enderlin, senior vice president and publisher of St. Martin’s Press, who was his longtime editor. He died at Jamaica Hospital.

Dr. Palmer published 19 books. “Extreme Measures,” his fourth novel, became a movie in 1996 starring Hugh Grant and Gene Hackman. He sold about five million books worldwide, and his books were translated into 35 languages, Ms. Enderlin said. His 20th novel, “Resistant,” is to be published in May.

Dr. Palmer began writing during what he described as the nadir of his life. An internist and former chief of medicine at Falmouth Hospital on Cape Cod, he had become hooked on self-prescribed pain killers and alcohol in the 1970s after a divorce and a series of knee surgeries. In 1978, he was charged with writing false prescriptions, sentenced to two years of probation and had his hospital privileges suspended.