NEW YORK — William Windom, who won an Emmy Award playing an Everyman drawn from the pages of James Thurber but who may be best remembered for his roles on ‘‘Star Trek’’ and ‘‘Murder, She Wrote,’’ died on Thursday at his home in Woodacre, Calif., north of San Francisco. He was 88.
The cause was congestive heart failure, said his wife, Patricia.
Mr. Windom won the Emmy for best actor in a comedy series in 1970 for his performance in ‘‘My World and Welcome to It,’’ a whimsical program based on Thurber’s humorous essays and fantastic cartoons. He subsequently toured the country with a solo show based on Thurber’s works.
But filmgoers and television viewers may be more likely to associate him with roles that, though also fanciful, had a distinctly darker tone. He teamed up with Rod Serling on episodes of both ‘‘The Twilight Zone’’ (“Five Characters in Search of an Exit’’ in 1961 and ‘‘Miniature’’ in 1963) and ‘‘Night Gallery;’’ played the president in ‘‘Escape From the Planet of the Apes;’’ and had a memorable role in an early episode of ‘‘Star Trek.’’ He was also a guest star on dozens of other television shows.
It was not until 1985 that Mr. Windom found another role that drew upon his avuncular side with such success: He appeared in more than 50 episodes of ‘‘Murder, She Wrote’’ as the leading physician of Cabot Cove, Maine, and a close friend of Jessica Fletcher, the lead character played by Angela Lansbury.
William Windom was born in 1923 in Manhattan to Paul Windom, an architect, and the former Isobel Wells Peckham. He was named after his great-grandfather William Windom, a congressman from Minnesota who also served as the secretary of the Treasury under Presidents Garfield and Harrison.
Mr. Windom attended Williams College in Massachusetts. Before becoming an Army paratrooper in World War II, he joined the Army Specialized Training Program, under whose auspices he studied at The Citadel, Antioch College, and the University of Kentucky.
While stationed in Frankfurt, during the postwar Allied occupation, he enrolled in the new Biarritz American University in France. ‘‘To be honest, I signed up because I thought it would be an easy touch,’’ he told The New York Times in an interview for this obituary in 2009, ‘‘and we had heard that actresses had round heels.’’
It was in Biarritz that he did his first bit of acting, playing the title role in ‘‘Richard III,’’ and when he returned to the United States, he continued to perform at Fordham University — his sixth institution of higher education. ‘‘I figure it all adds up to about two years’ worth of education,’’ he said.
Mr. Windom found work in the New York theater as well as in radio and on television, making numerous appearances on live dramas in the 1950s. He ultimately appeared in more than a dozen Broadway plays, including a four-show season with the American Repertory Theater and a 1956 revival of Noel Coward’s ‘‘Fallen Angels.’’ He performed for several seasons in summer stock in places like Bucks County, Pa., and the Southbury Playhouse in Connecticut, and he later toured the United States and other countries with one-man shows about Thurber and the World War II journalist Ernie Pyle.
Mr. Windom made his first film appearance as the prosecuting attorney in the 1962 drama ‘‘To Kill a Mockingbird,’’ sparring with Gregory Peck’s defense lawyer. His subsequent movies included Arthur Hiller’s ‘‘The Americanization of Emily’’ in 1964, Robert Altman’s ‘‘Brewster McCloud’’ in 1970, and the John Hughes comedy ‘‘She’s Having a Baby’’ in 1988.
Another notable role was as the male lead in the ‘‘The Farmer’s Daughter,’’ a situation comedy that ran on ABC from 1963 to 1966. His character, a Minnesota congressman (like Mr. Windom’s grandfather), is a widower who hires a Swedish-American governess (Inger Stevens) to care for his sons.
Mr. Windom, who was also a tournament chess player, was married five times. Besides his wife of 37 years, Patricia, he leaves four children and four grandchildren.
Mr. Windom’s biggest critical success was ‘‘My World and Welcome to It,’’ which was broadcast for only one season, 1969-70. But in certain circles, he is probably better known for the ‘‘Doomsday Machine’’ episode of ‘‘Star Trek.’’ He played Commodore Matt Decker, the sole survivor of a spacecraft who, along with the crew of the Enterprise, tries to neutralize a planet-destroying robot ship.