Robert Sweet, who tried to do an end run around his bosses in the Education Department, apparently has been tackled in his tracks.

Sweet, who had been accused of trying to set up a "New Right think tank" in the department, evidently has been forced out of his job as executive director of the National Council for Educational Research and given a new position at the White House.

The move ends an eight-month attempt by Sweet to gain control of the government's main educational research arm, the National Institute of Education. The attempt drew the wrath of senators, congressmen and Education Secretary Terrel H. Bell.

It leaves the NIE firmly in control of director Manuel J. Justiz, a New Mexico academic, who Sweet allegedly had been trying to undercut.

Sweet said he will work on education issues in the office of White House domestic policy chief Edwin L. Harper. He denied in an interview that he was forced out of his job.

"I really came to Washington to help the president in any way I can," he said. "I'm really excited about the opportunity to work in the White House."

The job will be the fourth Sweet, 45, has held since he left the tiny community of Dublin, N.H., 20 months ago to join the Reagan administration. A former textbook salesman and congressional candidate, he once headed the New Hampshire affiliate of the Moral Majority.

He has proved to be a master of bureaucratic intrigue and survival. The latest chapter in his story began in January when he was hired as executive director of the the National Council for Education Research (NCER).

The council had always been a low profile, policy advising body for the NIE, although it technically oversess the research agency. On Feb. 18, however, it passed a series of resolutions drafted by Sweet which would have, in effect, put him in control of NIE with his staff and $834,000 of the agency's budget at his disposal.

The resolutions were seen by Education Department officials as a bureaucratic end run, an attempt by Sweet to usurp Justiz's authority.

This was sticky business. Sweet had served as as NIE's acting director for six months and had sought to become permanent director. But he had lost the job to Justiz.

The American Educational Research Association charged Sweet was trying to "harass the director," create "a New Right think tank" and "gain power over the agency."

After weeks of hand-wringing, the matter came to a head last week as two congressional committees threatened to cut off the council's funds. On Thursday, Bell, Justiz and NCER chairman George Roche, president of Hillsdale College in Michigan, issued a joint statement.

The statement did not mention Sweet's name, or contain a word about the controversy. Instead, it talked about "opportunities to enhance the quality of American education and respond to the demands of the dynamic times in which we are living."

The only hint to what the statement was about came in the final paragraph. After lengthy meetings, Bell, Justiz and Roche "have defined further the relationship between the council and the institute," it said. "Secretary Bell has indicated his beliief that there will be a very productive and cooperative relationship that will encourage educational research and full staff cooperation in support of the activities of the institute, under the leadership of the director."

The translation: Bell had knocked a few heads and Sweet was out of a job. Justiz was back in control of the NIE.