National security affairs adviser Robert C. (Bud) McFarlane has told President Reagan that he intends to quit, and the president has accepted his resignation, administration sources said yesterday.

McFarlane, who has frequently been in conflict with White House chief of staff Donald T. Regan, informed the president during the Thanksgiving holiday in California that he was leaving because he wanted to spend more time with his family, the sources said. The announcement of his departure and of a replacement is expected later this week, sources said.

David M. Abshire, the U.S. ambassador to NATO, and John M. Poindexter, McFarlane's deputy, were identified by sources as leading candidates to succeed McFarlane. Former assistant secretary of state Lawrence S. Eagleburger and former United Nations ambassador Jeane J. Kirkpatrick were also mentioned as possibilities by some officials.

McFarlane, 48, a former Marine lieutenant colonel, has been telling friends for months that he wanted to leave. One source close to him said McFarlane believed that Regan had consistently undercut him and that he found his working relationship with the chief of staff "intolerable."

White House officials generally discounted published speculation that McFarlane would replace Mike Mansfield, 82, as U.S. ambassador to Japan, although one source said this was possible if Mansfield decides to step down next year. But sources close to McFarlane said he is more likely to become a private consultant, perhaps in association with his one-time boss, former secretary of state and national security affairs adviser Henry A. Kissinger.

McFarlane told the president of his intentions during Reagan's Thanksgiving week trip to his California ranch and Los Angeles. McFarlane also talked at length with William P. Clark, McFarlane's predecessor and a longtime friend of Reagan. On Monday, as the president flew to Seattle for a speech and then returned to Washington, McFarlane met with Reagan and Nancy Reagan in the presidential compartment of Air Force One, an official said.

Yesterday, McFarlane did not attend the National Security Council or the White House senior staff meeting. As an official put it, he simply "disappeared" from policy discussions.

White House officials declined public comment on McFarlane's impending resignation, but spokesman Larry Speakes said, "I think the president would abide by the wishes of any member who wanted to leave."

Under repeated questioning yesterday White House officials declined to deny McFarlane's impending departure. But several of them urged reporters not to attribute the resignation, if it occurred, to friction with Regan.

Despite these admonitions, several officials acknowledged that McFarlane was unhappy with what he perceived as Regan's ill-informed attempts to interfere on national security issues. Regan, who has organized the White House along corporate and hierarchical lines, was said by sources to resent McFarlane's independent access to the president.

Often, the conflict concerned what senior officials referred to as "process issues." McFarlane, a former staff member on the Senate Armed Services Committee and the son of a New Deal congressman from Texas, was annoyed by Regan's insistence that he be part of decisions on which he had little expertise, in McFarlane's view. The two men clashed over such issues as the MX missile and South African sanctions.

On South Africa, sources said, McFarlane took the lead in arguing for limited sanctions because he recognized that Congress would impose more punitive ones unless the administration acted. Regan at first opposed sanctions but ultimately joined McFarlane in recommending their imposition after Republican congressmen told him that the president would have too few votes in Congress to sustain a veto.

In addition to the disagreements on "process," Regan and McFarlane, both Marine combat veterans, had personal conflicts. One story told by officials is that Regan put down McFarlane by saying that it had taken him 20 years to reach the rank of colonel while Regan had attained this rank in one-fourth the time.

The remark irritated McFarlane, a veteran of the Vietnam war, because Regan's promotion came during World War II, when promotions were more plentiful.

McFarlane talked to friends last summer about quitting but was convinced that he should stay through Reagan's summit November meeting in Geneva with Soviet leader Mikhail Gorbachev. The summit was what one source close to McFarlane called "both a triumph and a disappointment" for the national security adviser; it also provided the timing for his resignation.

This source said McFarlane realized at the summit that a hope he once nurtured for limiting development of a U.S. missile defense in return for deep cuts in Soviet offensive nuclear weapons had become improbable. But McFarlane considered the summit an overall success because it had produced agreement for additional Reagan-Gorbachev meetings and "kept the arms control process alive," the source added.

"On balance, Bud figured that this was a good time to leave," the source said. "He had made a commitment to his wife to quit, had been in public service a very long time and was tired of the infighting. The summit, which he had a lot to do in producing, makes it possible for him to leave on a high note."

The Regan-McFarlane conflict continued at the Geneva summit. McFarlane felt irritated, some sources said, by a number of small slights by Regan, beginning with a decision by the White House chief of staff to sit next to the president at the meetings despite Regan's relative inexperience in foreign policy. Subsequently, a White House photograph of the meeting showed Regan leaning over a couch between Reagan and Gorbachev during one of the summit's most important moments.

In addition to his conflicts with the chief of staff, McFarlane was said to have become weary -- as Clark did before -- of trying to referee a series of disputes between two powerful Cabinet members, Secretary of State George P. Shultz and Secretary of Defense Caspar W. Weinberger.

Recently, McFarlane paraphrased Kissinger in discussing his situation with a friend, saying that there is "no safety net" under the national security affairs adviser. Kissinger's point, and McFarlane's, was that the secretaries of state and defense preside over vast bureaucracies which rise to their defense whenever they are in difficulty.

One longtime Reagan associate said of McFarlane, "The one image I have is of big elephants tromping all over him." This associate said it is one thing to avoid making the post as powerful as it was during Kissinger's tenure, "but you can't make it so weak that he can't perform. You need a person with stature, or he'll be trampled."

However, officials said yesterday that the position is likely to be diminished even further after McFarlane leaves because neither Regan, Shultz nor Weinberger is anxious for a powerful policy-making competitor in the White House.