Samuel P. Huntington, scholar, militarist and thorn in the side of world communism, returned to Harvard last week. Behind him in the world of Washington policymaking he left a carefully primed bear trap that could snap shut on Soviet-American trade if the Russians continue to push Jimmy Carter.

The imagery is crude, but not inappropriate in discussing the Washington arrival, impact and departure of Huntington, who has spent the past 18 months on the National Security Council staff in a job created for him by his boss and good friend, Zbigniew Brzezinski.

The bear trap lies buried in new regulations that bring the National Security Council into the review of export licenses for American technology being sold to the Soviet Union and other communist countries.

The new review procedures, in turn, grow out of a secret study memorandum that Huntington and other NSC staffers have been working on for months and which helped structure President Carter's decisions last month to use trade restrictions to demonstrate his displeasure with Soviet actions.

Each step of that process represented the kind of small, incremental but real triumphs within the bureaucracy that move foreign policy almost imperceptibly along a path that runs through memoranda, presidential directives and speeches rather than through bold, open strokes of action.

The Huntington experience in Washington offers a revealing glimpse into how this quintessentially Washington process works. But it also suggests broader points about the nature of American power in the post-Vietnam world.

Coming here on the campus-capital-campus shuttle that helped spawn Vietnam, Huntington was an acknowledged expert on military forces, structure and warface. He leaves as an outspoken advocate of "economic diplomacy" to force the Soviets to behave themselves.

The new emphasis coming out of the NSC on using nonmilitary means to roll back Soviet expansionism may also reflect some bureaucratic realities of the Carter administration.

Brzezinski and Huntington have focused on Soviet-American relations and co-authored a book on that subject. But neither has a detailed background in the Strategic Arms Limitation Talks (SALT) that are the center-piece of the Soviet-American power relationship today.

Without control of that issue, they have had to make their stand against the Soviets in other, less strategically central issues, such as Ethiopia, Zaire and now trade.

To return to crude imagery, Huntington is moving from soldiers to businessmen. His comments to a business group recently suggested that he believes that, just as war is too important to be left to generals, business is too important to be left to executives today.

"The history of this century supports the proposition that the fortunes of liberty in the world are closely and positively associated with the exercise of American power in the world," Huntington said in another recent speech that expressed his globalist approach.

While the Soviets have in some areas neutralized American military superiority, "In economics, technology, diplomatic relationships and political fields the United States has very substantial advantages that we should use to persuade the Soviets to be more cooperative," Huntington said in an interview, "and to counter them where they take actions that threaten the important interests of ourselves and our allies," he added, his voice rising expressively as he reached the word "counter."

The language comes almost directly from Presidential Review Memorandum 10, an assessment of global strategies for the United States that Huntington was originally hired to direct. He has nurtured this idea and language and watched it grow as it passed through presidential Directive 18 on national security, two major foreign policy speeches delivered by President Carter and Huntington's final major protect on the NSC, a review of technology transfer.

Operating at the policy margins, Huntington has helped apply a ratchet to the administration's view of competition with the Soviet Union, moving policy up a notch at a time on the way to the present standoff between Washington and Moscow.

Huntington and Brzezinski stress that a standoff was not their intention. But now that bad times have arrived, they want to lay out as many handles for action as possible for Carter, including trade.

"I am not urging economic warfare," Huntington said shortly before he cleared out his desk at the Old Executive Office Building on Aug. 12. "I am suggesting that we employ economic diplomacy" in dealing with the Soviets.

But fears that "economic warface" or something resembling it may become an acceptable policy tool if the confrontation worsens have begun to race through the American business community involved in the $2 billion-a-year trade with the Soviets.

Soviet officials have sent signals to at least one U.S. executive that they may shelve several large projects that American companies have been bidding on retaliation for Carter's decision last month to rebuse to allow Sperry-Rand Univac to sell Tass, the official Soviet news agency, a sophisticated computer.

The new role for the NSC staff in monitoring export licenses for technology greatly increases the chances that trade will be used as a policy instrument, despite strong opposition from the state, commerce and treasury departments. Two businessmen who have recently gone through the standard review of those agencies report that they were told they had also to seek "political" clearance from the NSC for their proposed exports.

Huntington's resignation coincides with the end of the major study on technology transfer that is encapsulated in Presidential Review Memorandum 31, but his departure is not connected to any specific event. He had promised to return this fall to Harvard to become director of the university's Center for International Affairs.

For Huntington who had a more substantial base in the academic community than did his boss, but who has been eclipsed in Washington by the more kinetic Brzezinski, the small, quiet triumphs in his time here have been mixed with major frustrations.

Brzezinski pushed him strongly as a candidate for the influential post of director of the international security affairs for Defense Secretary Harold Brown, but Brown rejected the idea. Discussions with Huntington's other strong friend in the Cabinet, Energy Secretary James R. Schlesinger Jr., about a top job in that department, also led to nothing.

Brzezinski brought him aboard the NSC staff first as a consultant and then as security planning coordinator assigned to write a "comprehensive net assessment" of Soviet and American global power. Huntington authored much of the secret review Memorandum 10 and Presidential Directive 18, which grew out of the study.

Those documents served to ignite and condition the terms of a debate about American strength and Soviet intentions that continues to rage and affects the chances of Senate passage of a SALT treaty and Carter's reelection chances in 1980.

From those papers grew a U.S. commitment to spend 3 percent more a year on defense in real terms, discounting inflation, a commitment that all other NATO members have endorsed as part of a 10-point long-term defense plan. But perhaps more important than any specifics was the impact on Carter of the general tone of toughness and the need to exercise U.S. power.

In Huntington's analysis, two key points emerged from the study and later found their way into speeches given by Carter at Wake Forest University and Annapolis during moments of high tension with the Soviet Union.

"First, we have to accept that our relationship with the Soviets involves both competition and cooperation," Huntington said. "Secondly, that as a result of the Soviet military buildup in the late 1960s and the "70s the Soviets have achieved what could be called rough overall military equivalence with the United States," but the United States can counter the Soviets when it has to with its leadership in economic and political diplomacy.

"As a result of that, last fall we began looking at the whole question of the economic problems in the Soviet Union, and at ways in which we could use American advantages in this area. One of the things that came out of this was a need for greater flexibility to provide economic inducement, or impose economic penalties, in the context of our overall political relationship with the Soviets," Huntington said.

It is that "flexibility" which provides the hidden bear trap with its teeth.

The study found "an area of striking U.S. advantage in oil technology," Huntington said. It was nearly complete when the Soviets opened a new campaign of harassment against U.S. journalists and mounted a public challenge to Carter by putting Soviet dissident Anatoly Scharansky on trial in Moscow.

The president immediately took what was to be one of the study's recommendations, the placing of oil technology on the Commodities Control List, and put it into effect.

He has also added another layer to the approval process by involving the NSC in reviewing all applications for technological transfers.

What happens next is anybody's guess. But Huntington leaves proud of having helped provide a framework for what he thinks could be a decisive point in American-Soviet relations.

"During the past five or six years, the expanded trade with the West has been one of the principal benefits of detente to the Soviet Union, which has imported up to $20 billion worth of machinery and equipment," Huntington said.

"They are now confronting great economic problems because the way they have expanded their economy in the past 20 years is no longer going to work. They now confront labor shortages and have to shift toward capital intensive technology" that they have to get from the West.

"I think that in the next year or two [Soviet President Leonid I.] Brezhnev or his successor confront a very real problem. Are they going to follow a policy of confrontation and decreasing economic ties with the West, which will then make worse their economic problems?

"If they are encouraging Cubans to intervene in Africa and taking harsh lines on dissidents and other things, I don't see how we can work with them to expand trade. We can if they are willing to be more accommodating and moderate their behavior."

Huntington repeatedly stressed that he did not advocate confrontation with the Soviet Union, but said that he believes in "maintaining military preparedness," a feeling he said is increasingly supported by public opinion.

"There is a strong tendency since early last fall toward a hardening of American public opinion against the Soviet Union. The polls show that clearly . . . people are concerned about the strategic balance and are not sure whether we're ahead or they're ahead." Asked about public reaction to the administration's high-profile handling of the Soviet presence in Ethiopia and Angola, he replied:

"I suspect if the administration had wanted to take much more vigorous action, military type action - which I did not favor - then public support could have been produced for them. It seems to me people are moving in that direction."

Huntington's exit is in character for a man who has stirred vivid opinions, to the point of having been dubbed "Mad Dog" by radical students at Harvard during the turbulent 1960s, years that produced what Huntington has described as a dangerous "excess of democracy."

Brzezinski, has not appointed a successor for him, spurring critics to note that as a sign of Huntington's irrelevancy to the new international political scene, and producing an interpretation from admirers about Huntington's uniquesness.