President Carter is expected today to name John W. McGarry, a Boston lawyer and close friend of House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.), to a seat on the Federal Election Commission.

The seat is now held by former Michigan congressman Neil Staebler, who indicated yesterday he may challenge the legality of the Carter action.

Carter initially appointed McGarry to succeed Staebler last year. But Staebler, whose term expired in April 1977, remained while Republican members of the Senate Rules Committee held up confirmation action on McGarry.

The committee eventually approved the McGarry nomination, but the Senate adjourned for the year before acting on it.

Today's action will be an "intermim appointment," made between sessions of Congress. White House officials interpret this to mean that McGarry can immediately replace Staebler and serve until the Senate acts on his permanent nomination.

White House counsel Robert Lipshutz confirmed that the McGarry appointment, first reported by the Cox newspapers, will be made today. He said the Justice Department has concluded that such an interim appointment is legal.

Staebler, however, who has remained in the $50,000-a-year post under a provision of the law that keeps an FEC member in place "until his successor has taken office as a member of the commission," said he disagrees with that legal interpretation. He said he will make a statement when the McGarry appointment becomes official.

Staebler's objections to the appointment were supported by Common Cause, the lobbying group, and by Republican National Committee Chairman Bill Brock.

FEC appointments are politically sensitive because the agency administers federal election laws, including those governing campaign contributions and financial disclosure.

Brock called the McGarry appointment "a blatant payoff for Speaker O'Neill."

"John McGarry is unfit to serve even on an interim basis as a commissioner of the Federal Election Commission and his pending appointment is a deliberate circumvention of the congressional clearance, process by President Carter - a process Mr. McGarry could not satisfy or won't," he said.

Brock charged that McGarry "has failed to provide the financial disclosure necessary to satisfy the U.S. Senate."

McGarry's nomination was held up for months in the Senate Rules Committee by Republicans who questioned whether McGarry properly completed the financial disclosure form required when he became chief counsel of the House administration Committee, his present position. Sen. Mark Hatfield (R-Ore.) and others said they did not see how McGarry could be considered fit to administer the FEC's disclosure laws if his own disclosure forms were incomplete or incorrect.