President Reagan has ordered his top policy and staff advisers to end once and for all the public recriminations that culminated in Secretary of State Alexander M. Haig Jr.'s latest charge that an unnamed presidential aide is running a "guerrilla campaign" to discredit him, it was learned yesterday.

The president's intervention, disclosed by a well-informed source, marks his strongest attempt to end the infighting and feuding that has been allowed to fester virtually unchecked within his national security high command ever since Inauguration Day.

Haig's latest, public accusation Tuesday stunned a White House that had come to regard friction between the sometimes-volatile secretary of state and other senior officials as an inherent part of the Reagan policy-making process.

While Haig's expressed fear is that one senior White House official is out to do him in, the reality is that virtually all of the president's senior aides have at times remarked among themselves and to reporters about Haig's extreme sensitivities and occasional outbursts. The problem within the Reagan administration is not one of ideological differences, sources say, but the difficulty Haig has in getting along with his administration colleagues.

As for the latest controversy involving Haig, one senior presidential adviser said, "It's not something that anybody would have wished. But it might have brought forcefully to the attention of all the extent of the problem."

It was this latest episode that finally prompted Reagan to take what one authoritative source called "definitive action." According to this source, the president made it clear to all parties involved that he does not want such public expressions to continue. It was unclear, however, whether the president bolstered this warning with a statement of what will happen to the offending party in the event that the in-house hostilities resume. When and how the president conveyed his orders to his aides was not clear. Haig did, however, telephone Reagan shortly before telling the Senate Foreign Relations Committee yesterday that "both the president and I recognize that these reports can be harmful to the conduct of our foreign policy" and that the two men remain in "total agreement" on substance.

Haig characterized the fuss as "a side issue I'd like to put behind us," but at the same time "not an insignificant one."

Whether Haig's "guerrilla campaign" accusation will mark the end of the public recriminations and private retributions is a matter of much concern within the Reagan inner circle. Months ago, in a meeting involving his top officials, the president, who by nature shuns such confrontations with his staff, instructed his senior policy advisers to end their divisive fighting and work together as a team. Peace was restored for a while, but the truce proved to be a part-time thing. And now Reagan advisers are uncertain that this truce will take.

"I don't know for sure," said one top White House official. "On the one hand, there is at least a possibility that it clears the air. But on the other hand it might complicate things."

The uncertainty voiced by this presidential aide stems in part from the fact that the senior White House officials have been telling each other in meetings for the past two days that they do not really know what Haig had in mind when he talked about one top-level White House aide who was running a "guerrilla campaign" against him.

At one point Haig reportedly believed White House chief of staff James A. Baker III was the guiding hand behind derogatory news reports about Haig; but the secretary of state has said, after confronting Baker with this charge, that he now does not think Baker is the one. Haig has also told national security adviser Richard V. Allen, his most frequent combatant, that he does not believe Allen is the culprit.

This has left some Reagan advisers wondering just who, if anyone, Haig had in mind.

"We thought that, if he was speaking in economic terms he might be referring to the 'Invisible Hand,' " said one senior adviser. Outsiders, recalling Haig's Senate Watergate committee testimony about the gap in the Nixon tapes, have wondered if Haig viewed the culprit as the "sinister force" that inhabits the White House.

In fact, the offending party in what Haig perceives as a campaign to discredit him may be both everyone and no one within the presidential senior staff. For virtually all of the president's advisers--plus a number of other Cabinet officials, and even a number of Haig's State Department subordinates--have spoken at various times with reporters about their concerns over the way Haig has conducted himself in public and in private meetings since the start of the administration.

They have spoken of their concern about the way Haig sought to seize control of the national security policy machinery at the outset of the administration, and how he sparred with Defense Secretary Caspar W. Weinberger and security adviser Allen and others in those early turf fights.

They have also spoken of their concern over the bizarre way in which Haig publicly challenged the president and the White House staff when a newspaper report first disclosed that Vice President Bush was being placed in charge of the crisis management structure that Haig had also once coveted. And they have spoken of their concern on the day the president was shot, over Haig's dispute in the Situation Room with Weinberger and his performance before a nationwide television audience when he explained how he was in control of things in the White House.

But mostly, these aides have spoken at various times of their concerns that the unpredictable outbursts and infighting have continued throughout the first 10 months of the Reagan administration. Most recently, Haig became angered upon hearing that Allen was going to be conducting a backgrounder in advance of the Cancun summit; Haig complained to the White House, and it was changed so that Haig and Treasury Secretary Donald T. Regan did the briefing.

What has puzzled Haig's administration colleagues most of all was the fact that they were convinced that--had Haig only relaxed and gone about his business--all of the power and national security policy control would have flowed to him anyway because he was easily the most celebrated and experienced official in the Reagan inner circle.

Even in Haig's continuing beleaguered state, as rumors and reports of his departure became public, the president has felt it important to assure the secretary of state and the world that Haig will be staying on the job. Reagan went out of his way, in fact, to praise Haig on several recent occasions as one of the finest secretaries of state.

One of the ironies of the latest round of reports, and Haig's latest public eruption, is that it may have won a new measure of job security for Haig's long-perceived nemesis, Allen. Reagan had ended a couple of months ago the long presidential tradition of having daily briefings from his security adviser, and there were reports that some insiders did not think Allen was up to the job and that he was slated to be replaced. But in his full praise of Haig, Reagan has added that Allen has also been doing his job, and will continue to do so.

Meanwhile, informed sources said, presidential counselor Edwin Meese III is working on a plan to "get the kinks out of the system." This includes a further defining of the role of the national security adviser and improving the communication and coordination of interagency working groups.