A federal grand jury in Alexandria is investigating allegations that some supporters of Libyan leader Col. Muammar Qaddafi plotted to assassinate anti-Qaddafi Libyans in the United States, according to sources familiar with the investigation.

Sources said at least three Libyan dissidents are believed to have been the targets of the alleged murder plot.

On Tuesday evening, FBI agents made surprise visits to pro-Qaddafi Libyans in Virginia, Colorado, Michigan and North Carolina and subpoenaed between 15 and 18 of them to appear before the federal grand jury in Alexandria, sources said.

Three of the Libyans subpoenaed were given immunity from prosecution in a brief hearing yesterday before U.S. District Court Judge Albert V. Bryan Jr. Assistant U.S. Attorney Joseph Aronica said in court that the government sought immunity for the three because they had invoked their constitutional right against self-incrimination and had refused to testify when they appeared before the grand jury earlier yesterday.

In all, about a dozen of the subpoenaed Libyans appeared at the federal courthouse in Alexandria yesterday. They were all represented by Richard C. Shadyac, a longtime attorney for Libyan interests in this country, and his son, Richard C. Shadyac Jr.

The grand jury is expected to resume hearing testimony today as more of the Libyans subpoenaed from other parts of the country arrive here.

"We don't know what's going on," Shadyac said yesterday, adding that he suspects the investigation is a "witch hunt" by the Reagan administration. "I have fully examined each of these alleged hit squads since the inception of the Reagan-Bush team and I have never found one scintilla of evidence," Shaydac said. "I challenge them to show me anything of substance."

Shadyac said all of those subpoenaed were either Libyan students legitimately in the United States or employes of the Libyan student center in McLean. The center was established by the Libyan government shortly after the Reagan administration expelled Libyan diplomats in 1981, accusing them of supporting international terrorism.

Shadyac said one of those granted immunity yesterday, Mohammad Ayeb, is an employe of the center, and the other two, Mohammad Abdul Gader Tumi and Tayeb Taher Ayad, are students at Washington area colleges.

The Tuesday night visits to the Libyans culminated a secret FBI counterterrorist investigation that has been under way for at least two months, sources said. They said the investigation has involved extensive surveillance of suspects, particularly in Northern Virginia, where teams of FBI agents have staked out suspected plot members sometimes with aerial assistance.

Reagan administration officials declined to discuss specifics of the investigation yesterday but said the administration has become increasingly concerned about renewed efforts by Qaddafi supporters around the world to retaliate against opponents of the radical Libyan leader. The officials said they fear that actions by pro-Qaddafi Libyans in this country may be related to a recent rash of assassinations and attacks in Western Europe and elsewhere.

Since late February, administration officials said, three Libyans believed to be opposed to Qaddafi have been assassinated in Europe and the former Libyan ambassador to Austria who had turned against Qaddafi was wounded in an assassination attempt in Vienna on Feb. 28.

The recent attacks in Europe are the latest manifestations of acts of violence that have been linked to Qadaffi's regime -- a government that the Reagan administration has repeatedly condemned as being a chief sponsor of international terrorism.

There have been previous suspected Libyan terrorist activities in this country, but the bulk of the attacks have taken place in Europe over the last several years.

Last April, a British policewoman was shot and killed outside the Libyan Embassy in London and 12 anti-Qaddafi dissidents conducting a demonstration there were wounded by gunfire that Britain charged came from inside the Libyan Embassy. The shootings sparked a 10-day siege at the embassy that ended when Britain severed its relations with Libya.

Reagan administration officials called attention yesterday to a report last year by the official Libyan news agency Jana that said Qaddafi's regime had formed suicide squads "to chase traitors, fugitives and stray dogs wherever they are and liquidate them physically and without hesitation."

An anti-Qaddafi student leader attending Colorado State University was shot and wounded in 1980 by a man the U.S. government accused of being a hit man for the Libyan government. The suspect was acquitted of attempted murder and conspiracy but convicted of misdemeanor charges and sentenced to two years in prison.

Although the Reagan administration closed the Libyan Embassy here, the Libyans have a mission at the United Nations in New York and Libyan students are still allowed to attend school in this country.

Shadyac said U.S. government harassment of the students has caused many of them to leave, and the number of Libyan students in the country has dropped from about 2,000 to about 700 over the last year.

The People's Committee for the Students of Libyan Arab Jamahriya Inc., which the Libyan government set up to provide financial and other assistance to students here, occupies a three-story office building in McLean and employs about 40 people. Federal officials have closely watched the center since it opened less than a month after the Libyan Embassy here was closed.

In December 1982, 12 Libyan students opposed to Qaddafi seized the building, alleging that the center promoted terrorism and harassed anti-Qaddafi students. Spokesmen for the center denied the allegations. The 12 were convicted of charges stemming from the takeover and were sentenced to a year in prison.