Six months ago, in order to encourage the estimated 3.5 million foreigners here illegally to participate in the 1980 census, the Justice Department imposed a ban on immigration service raids designed to ferret them out. U.S. census takers finished their field work weeks ago, but Attorney General Benjamin R. Civiletti has refused to lift the ban.

Immigration investigators contend that the restrictions severely cripple their ability to locate and deport illegal aliens, that a continuation of the moratorium would amount to a de facto amnesty for the undocumented workers and that the ban is politically motivated because it is intended to placate the vast numbers of Hispanic voters who oppose the deportation of friends or relatives.

"The attorney general hasn't formulated what his policy is going to be," said Justice spokesman John Russell yesterday in explaining why the moratorium has not been ended. He said Civiletti is studying the moratorium and one of the options under consideration is making the ban permanent. The spokesman denied that any political considerations were involved, but did say that Civiletti may discuss his decision with the White House before implementing it.

Civiletti has been especially concerned with the nation's Hispanic community, which is particularly sensitive to the illegal alien issue. Many undocumented workers are Hispanics, and several Hispanic leaders opposed his nomination as attorney general last year.

Those community leaders testified during the hearings that they felt he had not pushed hard enough to prosecute police brutality cases in the Southwest when he was head of the Justice Department's criminal division.

Since becoming attorney general, Civiletti has created a Hispanic advisory committee and named a special assistant for Hispanic affairs to work with hispanic groups around the country. He has also made a concerted effort to find a Hispanic to fill the now vacant directorship of the Immigration and Naturalization Service.

The restrictions prohibit immigration service sweeps of worksites in search of illegal aliens unless investigators have documented proof or a witness willing to testify that undocumented workers are there.

The moratorium was ordered in an effort to create "an atmosphere conductive to [obtaining] complete participation and disclosure of information" by those in this country illegally, according to the order transmitted to INS offices around the country on March 31.

Despite repeated assurances by the Census Bureau that the information it collects is not disseminated to other federal agencies, federal ofeficials had feared that, without the moratorium, the millions of illegal aliens in the United States might otherwise refuse to cooperate with census takers.

As an example of the possibilities for abuse, one official cited an incident that occurred just before the beginning of the census in which an INS agent in Texas visited the home of a Hispanic and identified himself as a census taker in an effort to gain entry.

The moratorium was initially slated to end June 30 but was extended through the end of July to allow census workers to complete their canvassing of neighborhoods.

On July 31, the INS central headquarters sent out a telegram authorizing its investigators to resume normal search operations in which they are allowed to conduct sweeps in businesses with the permission of the employer or, as in the case of construction sites, to lay in wait to question workers as they arrive for work.

But the next day, investigators were informed that Civiletti, who was attending a conference in Hawaii at the time, had ordered a continuation of the moratorium and had set no date for its end.

"Morale is already bad," said one investigator yesterday. "Now we have to consider the possibility that this thing will go on indefinitely."

One critic of the Carter administration's immigration policy, Roger Conner, director of the Federation for American Immigration Reform, charged yesterday that any extension of the moratorium is illegal.

"Congress passed a law that says that the attorney general 'shall' enforce the law. [A decision to extend it indefinitely] would be the kind of decision that breeds cynicism in the American people," he said.

A Census Bureau spokesman said yesterday that, "since our [ceusus] counts are pretty well completed . . . the need to make use of that moratorium no longer exists. We feel that we've counted everyone we're going to count. The moratorium is moot."