“It really is a major changing of the guard, and this is the end of the Kennedy dynasty,” Darrell M. West, a Brookings Institute scholar and author of “Patrick Kennedy: The Rise to Power.” “People have been speculating about its demise for the past few years. It’s over.”

Image Representative Patrick J. Kennedy before the State of the Union address on Jan. 27. Credit... Stephen Crowley/The New York Times

The death of his father was a “monumental loss” to Mr. Kennedy, said former Representative Jim Ramstad, a Minnesota Republican who had served as Mr. Kennedy’s “sponsor” in a recovery program for substance abusers. “He has been dealing with his grief as well as can be expected,” Mr. Ramstad said. “But it’s been tough. It’s always tough.”

Friends said Mr. Kennedy was able to soldier on through the first few weeks after his father’s death. He delivered a eulogy at the funeral, spoke to former staff members in front of the Capitol and visited people who had worked for years in his father’s various offices.

But, Mr. Ramstad said, Mr. Kennedy was “burned out on Congress,” and after the ceremonies surrounding his father’s death subsided, he endured some difficult weeks around the holidays. While that did not determine his decision, it might have hastened it, friends said.

And seeing Scott Brown, a Republican, win election to his father’s longtime Senate seat in Massachusetts was bitterly disappointing, something Mr. Kennedy let slip last week when he called the election of Mr. Brown “a joke.”

People who had seen Mr. Kennedy recently around the Capitol said he had appeared weary. Friends said that attending President Obama’s State of the Union address on Jan. 27 was especially emotional for him because it was an experience he had always shared with his father.

Like Ted Kennedy, Patrick Kennedy had grown close to the president, most recently sharing a ride in his cabin on Air Force One as they traveled to Boston to campaign for Martha Coakley, the Massachusetts attorney general, who lost to Mr. Brown. Mr. Kennedy approached the president after the State of the Union speech and gave him a big hug.