Justice Department prosecutors sidelined a state investigation into allegations of union corruption involving Secretary of Labor Raymond J. Donovan last winter, about a week or two before Donovan was confirmed as a member of the Cabinet.

The sequence appears to shore up the account of Donovan's chief accuser, a former New York union official named Mario Montuoro, and shows that Montuoro was willing to cooperate from the outset in any official pursuit of his charges. This account of events also helps to explain why Montuoro's allegations against Donovan did not surface in the secretary's confirmation hearings early last year even though the charges had been reported to federal officials.

Two former special agents of the New York State Commission of Investigation told The Washington Post yesterday that they launched an investigation early last January focusing on a Manhattan subway project being undertaken by Donovan's company, Schiavone Construction of Secaucus, N.J.

One of the investigators, Ed Barnes, said he interviewed Montuoro while Donovan was still facing stormy confirmation hearings before the Senate Labor Committee. Barnes said Montuoro told him, among other things, that Donovan had been present at a Long Island City restaurant in 1977 when another Schiavone official handed an envelope containing $2,000 in cash to the president of Montuoro's mob-connected union.

"It was the first case I started on in 1981," Barnes recalled, "but it never really got going. . . . Mario told me about the restaurant allegation, the no-show jobs on the subway project and that he'd mentioned it all to the feds in 1978. He was willing to work with us."

Montuoro, however, was also working with prosecutor James Harmon of the Justice Department's Organized Crime Strike Force in Brooklyn on another case, aimed at the prosecution of Louis Sanzo and others affiliated with Montuoro's old union, Laborers Local 29. That case involved $200,000 in payoffs from another contractor, unrelated to Schiavone, and, according to Barnes, Harmon didn't want anything to interfere with it.

"I went to talk to Mario and Harmon heard about it," Barnes said in a telephone interview. Harmon "called me and asked the state commission not to interfere while there were federal proceedings open involving Sanzo and other Local 29 officials. I said, 'You've got to talk to my boss. I can't stop a case.' "

Barnes' boss at the commission, Michael J. Moroney, a veteran labor-rackets investigator who once worked on the Brooklyn strike force, said he spoke to Harmon next. Moroney described Harmon as "an extremely honorable, decent guy" but unimpressed by the importance of Montuoro's allegations concerning Donovan.

"Jim explained to me that he had a case against Sanzo where Mario was a principal witness," Moroney said in another telephone interview. "Accordingly, Harmon said he didn't want various law enforcement agencies debriefing and talking to Mario at length, creating material that would have to be turned over to defense lawyers . . . . It can be a tremendous problem."

Moroney said he told Harmon that "Mario had information which concerned alleged payoffs by Schiavone to Sanzo and that was very important. I assumed Jim knew Donovan was going to be secretary of labor and this was very material.

"Jim didn't really know that and didn't really understand it," Moroney said. "He just said, 'Well, I intend to get into it, and when I do, we'll do the right thing with it.' "

Harmon did not return a reporter's call yesterday. He has previously refused to comment on the delays in purusing Montuoro's allegations.

Moroney said the state commission's chairman at the time, Adam Walinsky (a former aide and speechwriter for the late Sen. Robert F. Kennedy), had expressed interest in investigating Schiavone's 63rd Street subway project. Moroney also said Barnes, formerly a free-lance investigative journalist who had written of corruption in the Laborers International Union and Local 29, had been hired in the fall of 1980, and joined the commission staff in January, 1981, primarily to carry out that inquiry.

But in light of Harmon's assurances "that he would get into it and that he would get through the Sanzo trial in a reasonable amount of time," Moroney recounted, "I said I will not meet with Mario. I will not do anything further."

Moroney said he agreed to sidetrack the state inquiry "right around Jan. 20" when newspapers were full of other allegations that Donovan and his company had ties to organized crime and union corruption. Barnes thought it was a few days later, but both men agreed it was before Donovan was confirmed by the Senate on Feb. 3.

Moroney said his and Barnes' hopes of carrying out serious investigations by the state commission were shaken badly when Walinsky "was forced out" and announced his resignation last June.

At that point, Barnes recalled, "I just wanted to make sure somebody in the government was aware these allegations by Montuoro had been made, because I didn't see much being done."

As a result, the two men said they took their story to Walter Sheridan, the chief investigator for the Democratic minority on the Senate Labor Committee, last June before the Sanzo trial began. But Moroney said Sheridan told them his boss, Sen. Edward M. Kennedy (Mass.), the committee's ranking Democrat, had opposed Donovan's confirmation vigorously and "it was going to be very difficult for Kennedy to take another whack at it."

Sheridan felt "it'd look like sour grapes," Moroney said.

Larry Horowitz, Sheridan's staff director, said he decided the best course was for Sheridan to contact Thomas Puccio, chief of the Organized Crime Strike Force in Brooklyn, and make sure he was aware of the matter.

Sheridan said he tried to call Puccio a couple of times, without success, and then summer vacation intervened. Sheridan said he finally reached Puccio in September. The Sanzo trial was over by then, but Harmon, it appears, had yet to tell Puccio about Montuoro's allegations concerning Donovan and Schiavone Construction.

Said Sheridan: "I just told Puccio that I had information I hadn't heard before, that I didn't know if he'd heard it, but the information was in his office and it came from a guy testifying in a trial brought by his office. He said he had not heard of it before and he said he would look into it."

At that point, Moroney said, "things started to happen . . . . he and Barnes knew there had to be a special prosecutor, from the time the confirmation hearings" ended.