President Reagan's aides expect him to move swiftly to end a political embarrassment for his administration by naming federal appeals court Judge Anthony M. Kennedy of Sacramento to the Supreme Court, administration sources said yesterday.

Officials said that Reagan, who spent the weekend at Camp David, has not made a final decision but is favorably inclined to pick Kennedy, whom he has known for more than two decades, and that the nomination is likely this week.

These sources said that Attorney General Edwin Meese III and White House chief of staff Howard H. Baker Jr. discussed the next nominee following the withdrawal of Judge Douglas H. Ginsburg on Saturday, and that the two had agreed that Kennedy, regarded as a moderate conservative, is the best choice.

The 51-year-old appeals court judge, who was flown Saturday on an Air Force jet from McClellan Air Force Base near Sacramento to Andrews Air Force Base, is expected to meet with White House and Justice Department officials today. He will be questioned again about his background because of administration concern after Ginsburg's withdrawal that a nominee be able to withstand intense personal scrutiny by the Senate and the news media.

"We've had all the surprises that we can stand," said one official.

These sources said Reagan will act quickly in the wake of Ginsburg's withdrawal in the hope that the Senate can hold confirmation hearings before Congress recesses in December.

"We stressed the importance of filling this key vacancy on the court when Ginsburg was nominated, and we have to demonstrate that we're prepared to do our part by acting quickly," said an administration official.

Kennedy was Baker's preference when Ginsburg was chosen last month after the Senate rejected Judge Robert H. Bork, largely because Baker did not think that Ginsburg could survive the confirmation process. Reagan, who had vowed to select a nominee "that they'll {opponents of Bork} object to as much as they did" to Bork, selected Ginsburg over Kennedy in what one official described as "a close call," sources said.

Ginsburg withdrew nine days after he was nominated to the high court and two days after disclosing he had smoked marijuana while a Harvard law professor. On Oct. 23, the Senate rejected Bork, Reagan's first choice, by a 58-to-42 vote after an acrimonious political battle.

One official said the administration now faced "conflicting imperatives" of needing to move quickly so that hearings can be held by the Senate Judiciary Committee this year, while also making certain that the background of the next nominee has been carefully researched. These requirements appear to favor Kennedy, whom a White House official described as "a known quantity."

Senate sources said that Judiciary Committee Chairman Joseph R. Biden Jr. (D-Del.), who had scheduled hearings on Ginsburg to begin the week of Dec. 7, has not yet decided whether it will be possible to consider a new nominee this year.

Speaking yesterday on ABC's "This Week With David Brinkley," Sen. Arlen Specter (R-Pa.), a member of the Judiciary Committee, expressed "grave doubts about the talk of putting off the hearings until after the first of the year" and said "I would like to see us start the hearings on the same schedule, in early December."

However, Sen. Howell Heflin (D-Ala.), like Specter a key committee vote against Bork, stressed the need for a comprehensive investigation of the nominee.

"I think that it's wise to use perhaps maybe the language of the Supreme Court 'deliberate speed' pertaining to the movement of the next nominee," Heflin said on the same program.

"I would rather be right about this one and do it with deliberation rather than make a mistake," he said.

Administration officials and Senate sources said that Judge Kennedy's was one of the least controversial names on a list of 15 prospective nominees circulated on Capitol Hill by Baker and Meese after Bork was defeated. They said that neither conservative Republican senators who had supported Bork nor liberal Democrats who had led the successful effort to defeat him objected to Kennedy.

Sen. Strom Thurmond (R-S.C.), the Judiciary Committee's ranking Republican, pushed strongly for Reagan to choose federal appeals Judge William W. Wilkins Jr., and Thurmond is expected to do so again, but Wilkins has not had support in the White House or Justice Department.

Sen. Jesse Helms (R-N.C.) expressed his preference for Ginsburg after Reagan had already decided to nominate him at Meese's behest, officials said. Helms said at the time that he called the White House to tell them "no way, Jose" could he support one of the nominees on the list. Sources said Helms' opposition was to Kennedy.

Helms was traveling yesterday and could not be reached for comment on the prospect of a Kennedy nomination.

The prevailing view at the White House is that Reagan, nearing the end of his seventh year in office, risks the possibility of losing the opportunity to fill the vacancy unless he now submits a nomination that will have broad support in the Senate.

"If we have to start over again in an election year, the president may never get a chance to fill the vacancy," said one Republican.

The court seat unexpectedly became vacant in June with the retirement of Justice Lewis F. Powell Jr. At the time, the vacancy was seen as an opportunity for Reagan to leave his mark on the high court and to demonstrate that he still wielded political clout despite the damage inflicted on his presidency by the Iran-contra affair and a resurgent Democratic majority in the Senate.

Instead, the vacancy has become what one official called "a nightmare" that has underscored Reagan's diminished political authority.

One official said Kennedy's confirmation chances appear to be far better than those of Reagan's previous two selections for the Powell vacancy. In part, this is because the judicial views of Kennedy are considered closer to those of Powell, viewed as the court's swing vote on such controversial issues as affirmative action, church-state questions, and abortion.

Kennedy, a graduate of Stanford University and Harvard Law School, was named to the 9th U.S. Circuit Court of Appeals in 1975 by President Gerald R. Ford. A lawyer and legislative lobbyist in private practice in Sacramento before becoming a judge, he is known to the Californians who are close advisers to the president, including Meese, and helped then-Gov. Reagan draft a tax-reduction proposal, Proposition 1, that was defeated in 1973. Reagan and Meese backed Kennedy when Ford nominated him for the appeals court.

On the bench, Kennedy is best known for his 1980 decision in Chadha v. Immigration and Naturalization Service, later upheld by the Supreme Court, overruling the legislative veto as an unconstitutional infringement on the doctrine of separation of powers. He also overturned a decision requiring the state of Washington to pay male and female employes based on the "comparable worth" of their jobs and said the constitutional right of privacy did not bar the Navy from dismissing homosexuals.

The Supreme Court adopted Kennedy's reasoning in his dissent in U.S. v. Leon, which established a "good-faith" exception to the rule excluding illegally seized evidence from being used at trial.

Kennedy had some strong backers in the Justice Department when Reagan opted for Ginsburg, including Assistant Attorney General Richard K. Willard, a former Kennedy clerk, and former department official Carolyn Kuhl, who also clerked for Kennedy. However, other officials argued that Kennedy lacked the intellectual depth of Ginsburg and expressed concerns that he was not as reliably conservative, department sources said at the time.

Saturday morning, when it was clear that Ginsburg would withdraw, one administration official pointed to the "hits" Kennedy had taken from conservative senators during the earlier round and expressed hope that the president would nominate another appeals court judge, Ralph K. Winter Jr. of New Haven, Bork's former colleague at Yale Law School.

However, a senior Justice Department official said yesterday that there was ultimately no disagreement between the White House and the department over whether Kennedy should be nominated.

The opportunity to end this embarrassing episode in the Reagan presidency with a moderate nominee who will win broad approval could give both Reagan and his chief of staff, Baker, an opportunity to put a politically disastrous sequence of events behind them.

Reagan's decision to name Ginsburg instead of Kennedy late last month was seen by Meese supporters and other staunch conservatives as a humiliating defeat for Baker, an evaluation that some of Baker's friends also endorsed. There was some talk in administration circles that Baker might want to give up the job of chief of staff.

Baker strongly denied this in an interview last week. "I intend to be here to lock the doors and turn out the lights," he said.