Secretary of State Alexander M. Haig Jr. believes he was maneuvered and trapped into leaving office last week by White House officials anxious to gain control over the process of making foreign policy, according to two of his close associates.

Though Haig realized that longstanding tensions with the White House staff were near a breaking point last week, his associates said he did not intend to resign and was surprised when President Reagan told him on Friday that his resignation was being accepted.

In a private meeting Thursday with the president at the White House, Haig had formally laid out a long list of grievances including selections from cable traffic on the Mideast to document his allegation of White House staff meddling in foreign affairs. According to two of Haig's associates, the secretary of state stopped short of actually offering the resignation because he hoped the president would reaffirm Haig's control over policy.

Another administration official said, however, that within a few hours of the Thursday meeting Haig was saying he had resigned. And yesterday, other White House officials, told of Haig's remarks to his associates, reiterated that Haig had indeed offered his resignation at the Thursday meeting with Reagan. They acknowledged, however, that the president did not accept the resignation at that time.

Since Haig had been forewarned by a high White House official that the president would accept Haig's resignation if it were offered, the president's failure to do so at the meeting may have led Haig to believe that Reagan wanted him to stay on the job.

Whatever was said in this meeting, where only Reagan and Haig were present, the secretary of state late Thursday was telling associates that all looked quiet and resignation was not on the horizon.

One of them, intent on getting Haig's side of the story out, said yesterday, "Haig did not realize that complaining to the president meant resignation. . . . The complaint was not for the purpose of resigning but for the purpose of rectification."

This associate and another, both of whom declined to be identified by name, said that Haig in the last several days has told them he was "set up," "entrapped" and "sandbagged" by a hostile White House staff that wanted to control foreign policy.

So when the president asked to see Haig after a National Security Council luncheon on Friday and said he was accepting the resignation, Haig was caught without a resignation letter.

One Haig associate said yesterday, "There was a master plot to get rid of him. . . . He was, in fact, fired."

This person, who has spent hours talking with Haig since last Friday, claims that the White House hostility began on day one of the administration and last week's resignation was a culmination of personality and policy differences, accompanied by many blunders by Haig and especially by Haig's staff.

The White House campaign intensified this month, the official said, and Haig's preeminence in foreign affairs was systematically challenged in nearly all areas--Europe, China, the Middle East, the United Nations and the arms reduction talks.

Another close associate gave it a somewhat more benign interpretation: "There was a semi, half-conscious effort by the White House staff to press all the buttons on this man's console, to influence him to dissociate himself from his source of strength--the president."

"Alert as he was to all the booby traps littering the White House lawn, he stepped on one."

The associates name four officials as key to Haig's demise:

Vice President Bush, who wants to be president and allegedly considers Haig a potential rival. Bush reportedly is no friend of Haig's, and felt slighted when he was sent to China as ambassador at a time Haig was still at the White House in 1974.

James A. Baker III, White House chief of staff. A former Bush campaign manager, Baker served as undersecretary of commerce under Elliot L. Richardson.

Michael K. Deaver, deputy chief of staff, and often considered an alter ego to the president. Deaver, interested in minimizing political problems for Reagan, grew frustrated with Haig's front and center position as a source of frequent embarrassment and tension in the administration.

Richard G. Darman, an assistant to the president. During the Ford administration, Darman worked with Baker in the Commerce Department and was an aide to Richardson. Darman also served as an aide to Richardson in several departments, including Justice at the time of the Saturday Night Massacre.

One Haig associate also pointed a finger at former secretary of state Henry A. Kissinger, who reportedly discouraged the Haig appointment in the first place.

"Just read page 80 of Henry's latest book," he said, noting that Kissinger's book, "Years of Upheaval," had some kind words for George P. Shultz, who has been selected to replace Haig.

Kissinger's book, on page 80 and 81, says of Shultz: "I met no one in public life for whom I developed greater respect and affection. Highly analytical, calm and unselfish, Shultz made up in integrity and judgment for his lack of the flamboyance by which some of his more insecure colleagues attempted to make their mark. . . . If I could choose one American to whom I would entrust the nation's fate in a crisis, it would be George Shultz."

(A White House official says Kissinger played no role in the Haig resignation. A friend of Haig's agreed, saying that Kissinger was too far removed. "They were roughing it up pretty close, and you would have to be a paid referee to see where the elbows and knees were coming from.")

For his part, Haig has, for now at least, decided not to speak publicly about the resignation, and his associates discount any suggestion that he will run for president. "He wouldn't get 30 votes on the convention floor," said one. Haig is "smart enough to identify a pointless enterprise," the other friend said yesterday.

Nonetheless, these associates are quick to suggest that the White House, and particularly Bush, worried about a Haig candidacy. One associate said, "Maybe the resignation was really the first primary of 1984. The District of Columbia's primary, Haig versus Bush."

The associates, speaking in separate interviews, gave this account of last week. By Monday and Tuesday Haig was feeling that his status was being eroded and felt he would have to resign; he then prepared his case to present Wednesday night to national security adviser William P. Clark.

Clark suggested that Haig take his message to the president. That was done Thursday. At a meeting Haig had with aides Thursday morning, a resignation seemed "inevitable," in the words of one participant. But by late Thursday night, Haig said, and conveyed the impression, that the storm might blow over.

This recounting of events is supported by the fact that all of Haig's top aides and even his wife, Pat, did not learn of the resignation until after the Friday Reagan-Haig meeting. Pat Haig learned about it at 2:15 p.m. Friday, just 45 minutes before Reagan went on television to announce the resignation, according to one of Haig's associates.

According to White House officials, Haig then promised to have his resignation letter at the White House by 2:30. When it was not there by 3 p.m., the president announced the resignation. This, according to one White House official, was in part an incentive designed to push and ensure the actual resignation letter. It did not arrive until 4:20 p.m.

Haig's associates also indicated yesterday that Haig may stay in Washington in some kind of position in private business. He would, in the words of one, "play a prominent role in American politics in the future."