The chief executive and the chairman of Freddie Mac both said Wednesday that they intend to step down, in a shake-up that comes just as the government-backed mortgage finance company is being tasked to play a major role in a new plan to help struggling homeowners.

Chief Executive Charles E. Haldeman Jr., a former mutual fund executive who has led the company since July 2009, will leave the McLean-based firm sometime next year.

Board Chairman John A. Koskinen, a former Clinton administration official who has led Freddie’s board since September 2008, will step down in February.

Others leaving are board members Robert R. Glauber, a former financial regulator, and Laurence E. Hirsch, an investor.

The new board chairman will be Christopher S. Lynch, a former senior executive with the accounting giant KPMG.

The changes come as Freddie prepares to play an important role in an initiative unveiled this week to help “underwater” homeowners, who owe more than their properties are worth.

The plan, announced by President Obama and the Federal Housing Finance Agency, would make it easier for these borrowers to refinance their mortgages at lower rates.

Only mortgages owned or guaranteed by Freddie, or its sibling company, District-based Fannie Mae, would be eligible.

There was no sign Wednesday that the executive shake-up at Freddie Mac had anything to do with the announcements. Koskinen and Glauber have reached the company’s mandatory retirement age.

“As to my tenure, I am 63, and there will be some day when my tenure will come to an end,” Haldeman said in Boston before the announcement was made, according to Reuters.

Freddie and Fannie, though technically companies, are really more like government agencies. They have received more than $130 billion in taxpayer aid to stay afloat, and the housing regulator FHFA has the legal authority to direct their operations.