John Heard, an actor who played pained characters in dramas but was probably best known for his role as the father who mistakenly left his youngest son behind on a family trip to Paris in the comedy “Home Alone,” died on Friday in Palo Alto, Calif. He was 71.

The Santa Clara County medical examiner’s office said the cause was under investigation.

Mr. Heard recently had surgery for back pain at Stanford University Medical Center and was recovering at a nearby hotel, where a housekeeper found his body, his former wife, Sharon Heard, said in an interview on Saturday.

Mr. Heard started his career playing serious roles in the theater and was praised for his wrenching performance as a disabled and emotionally tortured Vietnam veteran in the 1981 film “Cutter’s Way,” which also starred Jeff Bridges.

Mr. Heard gained recognition mainly for lighter roles in films of the 1980s and ’90s like “Home Alone,” in which he played Macaulay Culkin’s father, and before that “Big,” with Tom Hanks.

With his squinting blue eyes and clean-shaven good looks, Mr. Heard often embodied the stereotype of the 1980s businessman, bringing a mixture of flustered charm and self-assurance to the roles.

John Matthew Heard Jr. was born on March 7, 1946, in Washington and briefly pursued a master’s degree in theater at the Catholic University of America in that city before leaving to build a professional acting career. His early years were spent in Off Broadway productions.

He made his film debut in 1977 in “Between the Lines,” about a socially conscious alternative newspaper in Boston about to be taken over by a big company. He led a cast that featured Jeff Goldblum, Lindsay Crouse and Marilu Henner.

Interviewed by The New York Times afterward — he was performing onstage at the time as an anxious husband in a production of August Strindberg’s “Creditors” — Mr. Heard struck a note of searching self-deprecation.

“I think this interview is a little premature,” he said, adding, “I don’t know, maybe after this is over, I’ll go back to Washington and be a plumber’s helper again.”

Instead, he went on to star in art house films like “Cutter’s Way” and later in commercial hits like “Big” (1988), in which he played an executive who mocks the little boy in a man’s body (Mr. Hanks), only to watch him climb the corporate ladder and win over his girlfriend.

In “Home Alone,” a 1990 John Hughes movie that The Times said might be the “first Christmas black comedy for children,” Mr. Heard’s character, Peter McCallister, panics as he realizes that he has forgotten his son Kevin in the rush to get to the airport for a family trip to France. Kevin awakes to an empty house, announces, “I made my family disappear!” and goes on to fend off two bumbling burglars, played by Joe Pesci and Daniel Stern.

Mr. Heard also appeared in the sequel “Home Alone 2: Lost in New York” (1992).

The actress who played the girlfriend in “Big,” Elizabeth Perkins, described Mr. Heard on Twitter as “the perfect foil, perfectly sly & a perfect gentleman.”

He had film roles in “Beaches” (1988), “Gladiator” (1992) and “The Pelican Brief” (1993) and made television appearances on shows like “Miami Vice,” “NCIS: Los Angeles” and “The Sopranos.” His guest performance as a corrupt police detective in “The Sopranos” was nominated in 1999 for an Emmy Award.

Ms. Heard, who was married to Mr. Heard from the late 1980s to the mid-1990s, said he had been highly selective in the roles he took. “He’d never compromise,” she said. “He’d get scripts every day, but he didn’t care about money. He didn’t care about the Hollywood scene at all.”

She said that “Cutter’s Way” had been “his pride and joy” and that he had resented being identified with the suburban father from the “Home Alone” movies.

She and Mr. Heard had two children, Annika and Max. Max died in 2016. He is survived by his daughter as well as a sister, Cordis Heard, and a son, John M. Heard III, from a previous relationship with the actress Melissa Leo.

Beginning in the 1990s, Mr. Heard made headlines over a protracted custody battle with Ms. Leo over their son. He also had two brief marriages, to Margot Kidder and to Lana Pritchard.

“John and Max were both creative, tormented, beautiful geniuses,” Ms. Heard said. “These people felt things differently, and they made the world magical.”