The United States' refusal to grant asylum to persons fleeing El Salvador appears to be a violation of an international agreement on the treatment of refugees, according to an investigation by the office of the United Nations high commissioner for refugees.

The investigation, completed last October and obtained by The Washington Post, found that the United States has followed a "systematic practice" of returning Salvadorans to their country regardless of the merits of their claims for asylum, in violation of the U.N. Protocol and Convention on the Treatment of Refugees, which prohibits the expulsion of a refugee to a country where persecution is likely to occur. El Salvador has been in the throes of political violence and civil war for two years.

The commissioner's finding "is sad and it is without precedent," said Sen. Edward M. Kennedy (Mass.), the ranking Democrat on the Foreign Affairs subcommittee on immigration and refugee policy.

"What I find distressing is that this is the first time officials of the United Nations high commissioner's office have even found it necessary to suggest that the United States is failing to fulfill its international obligations toward refugees," said Kennedy, who attempted last year to intercede with the State Department on behalf of the Salvadorans.

Kennedy was informed last April in a letter from the State Department that "while civil strife and violence in El Salvador continue at distressing levels, conditions there do not, at present, warrant the granting of special status to Salvadorans in the United States." "What I find distressing is that this is the first time officials of the United Nations high commissioner's office have even found it necessary to suggest that the United States is failing to fulfill its international obligations toward refugees."

Michael Maggio, a Washington lawyer who represents Salvadorans in deportation hearings, said of the administration policy, "It's politics. This is the first time the U.S. has deported people to a civil war situation."

The U.N. report quoted federal Immigration and Naturalization Service statistics indicating that of the 6,000 Salvadorans apprehended entering the country illegally in the 1981 fiscal year, only one was granted asylum and none was allowed to stay temporarily in this country for humanitarian reasons.

"This would appear to be the result of a deliberate policy established by the U.S. authorities in Washington," the U.N. report concluded.

President Reagan told Congress Thursday that the human rights record of the government of El Salvador entitles the country to receive U.S. aid to fight leftist guerrillas, clearing the way for the release of $26 million in military assistance.

He said the regime of President Jose Napoleon Duarte "has made a concerted, significant and good-faith effort to deal with the complex political, social and human rights problems it is confronting and progress is being made."

That announcement followed by just two days a report by the American Civil Liberties Union charging the U.S.-supported government with an estimated 12,501 murders during 1981 and detailing charges of systematic murder, torture, arbitrary arrests and other denials of human rights.

Published reports last week also quoted witnesses who charged government forces with a large-scale massacre last month in the rural Morazan Province.

Maggio charged that as long as Reagan chooses to deal in military assistance to El Salvador, the president cannot recognize the plight of those fleeing the fighting.

"These people are fleeing U.S. bombs and bullets. They are refugees spawned by U.S. foreign policy," he said.

The U.N. report found that illegal aliens from El Salvador have been turned back whenever possible as "voluntary" returnees, often without being informed of their rights to ask for asylum. For those who have requested asylum, many have had their rights to asylum proceedings seriously cut back.

Salvadorans who request asylum are The U.N. report quoted federal Immigration and Naturalization Service statistics indicating that of the 6,000 Salvadorans apprehended entering the country illegally in the 1981 fiscal year, only one was granted asylum . . . . being kept in detention, although it is not required under U.S. law. Abnormally high bail levels, also not legally required, have been set. And even those Salvadorans who have been able to raise the bail, generally from contributions by church groups, are being denied temporary work permits, according to the U.N. investigation.

Few of the Salvadorans have the money to pay for legal advice, and in many cases it was found that government officials were neglecting to tell them that free legal advice was available.

"All undocumented Salvadorans, like Mexicans, are presumed to be illegal immigrants and therefore deportable, without taking into consideration the political conditions currently occurring in their homeland," the report said.

The U.N. investigators also found that despite the dangerous conditions in El Salvador, they could not find a single case where a Salvadoran had been given special status to remain in the United States at least temporarily until conditions improve in his home country.

Many foreign nationals have been allowed to remain here temporarily during periods of danger in their home countries. This special immigration status has been extended in the past to people from countries including Nicaragua, Ethiopia, Uganda and Lebanon.

Last month, for example, all deportations to Poland were suspended, but there has been no such accommodation for the Salvadorans.

The report concluded that the "apparent failure of the U.S. government to grant asylum to any significant number of Salvadorans, coupled with a large-scale forcible and voluntary return to El Salvador, would appear to represent a negation of its responsibilities assumed upon its adherence" to the U.N. protocol.