John Heard was best known for his role as the father in “Home Alone.” (Mark Mainz/Getty Images)

John Heard, a veteran actor and Washington native whose many roles included the father in the “Home Alone” series and a corrupt detective in the HBO TV hit “The Sopranos,” has died. He was 71.

Mr. Heard was found dead Friday in a hotel in Palo Alto, Calif., the Santa Clara County medical examiner’s office said Saturday. A representative for Mr. Heard told TMZ that he was staying in the hotel while recovering from back surgery at a nearby hospital.

An investigation is underway to determine the cause of death, but so far there is no evidence of foul play, the medical examiner’s office said.

Mr. Heard first drew critical attention as an off-Broadway actor in the late 1970s, when he received an Obie Award for his performance as a man who prepares dead soldiers for burial in David Berry’s play “G.R. Point,” and again for his roles in “Othello” and “Split” at the New York Shakespeare Festival.

He turned fully toward commercial work after the success of the 1990 film “Home Alone,” which the New York Times described as possibly “the first Christmas black comedy for children.” Mr. Heard played Peter McAllister, the kind but absent-minded father who accidentally leaves his son Kevin (Macaulay Culkin) at home while the rest of the family travels to Paris.

Mr. Heard in 2006, rehearsing for a Chicago production of the Don DeLillo play “Love-Lies-Bleeding.” (Brian Kersey/AP)

Mr. Heard said that he sought a movie with children in it so that his 5-year-old son could visit the set and have someone to play with.

The film became a hit, grossing more than a half-billion dollars worldwide, but Mr. Heard was reluctant to revisit the role. His agent convinced him the money was too good to pass up, and Mr. Heard returned for “Home Alone 2: Lost in New York” (1992), in which Culkin accidentally travels to Manhattan while the rest of the family visits Florida.

A third film, released in 1997, featured a new child star (Alex D. Linz) and a new father figure (Kevin Kilner).

“I didn’t want to be the ‘Home Alone’ dad for the rest of my life,” Mr. Heard told Yahoo News in 2013.

John Matthew Heard Jr. was born in Washington on March 7, 1946. He graduated from the Jesuit Gonzaga College High School in 1964, and four years later received a bachelor’s degree from Clark University in Worcester, Mass.

Mr. Heard returned to Washington, working as a plumber’s assistant while studying for a master’s in theater at Catholic University, before dropping out to pursue acting full time, including in productions at Arena Stage. “I was lazy,” he told the New York Times in 1977. “I was just looking for a way to make a living, I guess, and I decided I didn’t want to teach drama, I wanted to do it.”

Mr. Heard originated the role of Billy, a gay soldier in David Rabe’s play “Streamers,” at a 1976 production in New Haven, Conn. The following year he appeared alongside Geraldine Page and Rip Torn in August Strindberg’s comedy “Creditors.”

He broke into film as a newspaper reporter in “Behind the Lines” (1977); a doe-eyed civil servant looking for love in “Chilly Scenes of Winter” (1979), based on a novel by Ann Beattie; and as a one-eyed, one-legged, one-armed Vietnam War veteran in “Cutter’s Way” (1981), also starring Jeff Bridges and based on Newton Thornburg’s novel “Cutter and Bone.”

Mr. Heard remained active in film for the next decade, including roles as Tom Hanks’s rival in “Big” (1988) and Page’s son in “The Trip to Bountiful” (1985).

He earned an Emmy nomination in 1999 for playing Vin Makazian in “The Sopranos,” a role he said he got after running into series star James Gandolfini in a gym. His time on the show ended like it did for many other “Sopranos” actors — with his character’s death.

Mr. Heard said he approached series creator David Chase and said, “ ‘Why me? I’m a detective! You can use me forever!’ And he told me, ‘John, there’s a rule in television. Somebody has to die that the audience likes.’ I said, ‘They like me? How do you know they like me?’ He said, ‘Well, they like you. So we’re gonna kill you.’

“My mother said, ‘Why do you have to die in everything?’ I said, ‘You’re telling me? I could’ve made a fortune!’ ”

Other TV roles kept Mr. Heard busy. He acted in “CSI: Crime Scene Investigation,” “Elementary,” “Prison Break,” “Modern Family” and “Entourage.” One of his favorite jobs came in the 2013 TV movie “Sharknado,” in which a storm swamps Los Angeles with sharks.

“I knew it was going to be a cult classic,” he told the Baltimore Media Blog last year. “It’s just ridiculous. I thought it would replace people calling me the ‘Home Alone’ dad.”

Mr. Heard was married to Margot Kidder, an actress who played Lois Lane in the “Superman” film series, for six days in 1979. Marriages to Sharon Heard and Lana Pritchard also ended in divorce.

Max Heard, a son from his marriage to Sharon Heard, died in December. Survivors include Annika, a daughter from his marriage to Sharon Heard; John Heard III, from a relationship with actress Melissa Leo; and a sister.

Mr. Heard and Leo were engaged in a custody battle for much of the 1990s, resulting in Mr. Heard’s being convicted of trespassing and telephone misuse in 1997. In an interview with Larry King, he said he repeatedly called Leo to try to remain close with his son, whom he brought to the set of “Home Alone.”