The Justice Department official responsible for investigating Nazi war crimes has recommended that former U.N. secretary general Kurt Waldheim be barred from the United States because of charges that he was involved in World War II atrocities against Yugoslav partisans, department sources said yesterday.

However, the sources emphasized that the recommendation by Neal Sher, head of the department's Office of Special Investigations, is only an advisory opinion and that Attorney General Edwin Meese III will have to decide whether to follow Sher's advice.

Department spokesmen, reflecting awareness of the political and diplomatic implications of the proposed action against Waldheim, who is running for president of Austria, refused all comment last night except to say that "no conclusions have been reached. Nor has any review taken place at any decision-making level."

According to the sources, that means only that the matter will not reach the decision-making stage until it moves up through the channels of the criminal division, of which Sher's office is a part, and reaches Deputy Attorney General Stephen S. Trott. He will forward it with his recommendation to Meese, who is out of the country until the weekend.

The sources said that Meese, in deference to administration sensitivities about interfering in the May 4 election, is unlikely to take any action before then.

The sources said that Sher made his recommendation after examining a secret 1948 finding by the U.N. War Crimes Commission that there was sufficient evidence to prosecute Waldheim for "murder" and "putting hostages to death" while he was a German army officer in the Balkans in 1944-45.

The United Nations has kept the file secret, but recently gave copies to the Israeli, Austrian and U.S. governments under a pledge of confidentiality. On Tuesday, The Washington Post obtained a copy, which said the U.N. commission had concluded in 1948 that a "clear prima facie case had been presented" and had put Waldheim on its top-priority list of persons who "should be delivered up for trial."

The Knight-Ridder newspapers reported yesterday that they had obtained portions of Sher's memo. They quoted him as saying, "With all due respect to the position and achievements attained by Waldheim after the war, it is clear that he lacks credibility with respect to his whereabouts and activities during the war."

The Knight-Ridder report said Sher concluded that if someone less prominent than Waldheim were involved, "a determination of excludability [from the United States] would be clear and routinely made."

If Waldheim is elected May 4 and if Sher's recommendation is adopted, the United States would be in the apparently unique position of having branded the head of state of a friendly nation as a suspected war criminal and an "undesirable alien" under U.S. law. The Justice Department sources were unable to say last night whether a similar situation has ever arisen.

Waldheim, who was U.N. secretary general from 1972 to 1982, has denied all the charges as based on false testimony from an unreliable witness. He has admitted, however, that for four decades he concealed the fact that he had been in Greece and Yugoslavia from 1942 to 1945, and sought instead to leave the impression that he was studying law in Vienna then.

Austrian President Rudolf Kirchschlaeger said Tuesday that after examining the U.N. file and other documents, he was unable to make a judgment about Waldheim's wartime activities but did not consider the available evidence sufficient to indict him.

Waldheim said he considered Kirchschlaeger's opinion a vindication of his claim that the charges were without foundation.

If Meese adopts Sher's recommendation, Waldheim would become one of an estimated 40,000 people on the Immigration and Naturalization Service's "watch list" of individuals not permitted to enter this country. Federal law specifies that among the categories of people who can be put on the list are aliens who were associated with the Nazi government in Germany, with governments that were allies of the Nazis or with puppet governments in Nazi-occupied areas.

Justice officials were unable to say whether Waldheim could obtain permission to appear at the United Nations in New York if he were put on the "watch list." The headquarters agreement between the United States and the U.N. secretariat provides exemptions for otherwise excludable individuals coming to this country on official U.N. business. However, some officials noted, it is unlikely that Waldheim would risk the embarrassment of seeking an exemption even if he were Austria's president.