A U.S. District Court judge today rejected a motion by former CIA agent Edwin P. Wilson that charges pending against him here be dismissed on grounds that he was illegally lured back to the United States by the U.S. government.

Wilson's attorneys argued that Wilson left Libya last June believing he had assurances from the National Security Council that he could travel to a haven in the Dominican Republic, where he was to establish a phony company with Virginia businessman Ernest R. Keiser, who was cooperating with the U.S. government.

From there, Wilson was to begin providing intelligence to the United States, his attorneys said.

Ruling from the bench after a full day of testimony by the key players in the ruse that led to Wilson's arrest in New York last June 16, Judge Ross N. Sterling said the evidence presented by Wilson's attorneys "doesn't rise to anywhere near the level" of a prior case on which the motion was based, "or any other case."

Wilson, who in Virginia last month was convicted of illegally exporting four handguns and an M16 rifle to Libya, is charged here with exporting 20 tons of plastic explosives to Libya. His trial is scheduled to begin next month.

In Washington, Wilson faces a murder conspiracy charge and a charge of illegally exporting explosives.

Testimony today came from three men intimately involved in the plot to get Wilson back to the United States: Keiser, the go-between, who said he had known of Wilson since the early 1960s and said he had worked on contract for the CIA in the past; Daniel Drake, an associate of Keiser, and E. Lawrence Barcella Jr., U.S. attorney for the District of Columbia, who oversaw the operation.

Their testimony made it clear that Wilson was deceived into leaving Libya. Keiser and Drake said they told Wilson that Keiser was working in connection with the NSC on the intelligence project and that the matter had been discussed with Vice President Bush.

Keiser also said he had received a $430,000 "loan" from Wilson for a land deal that Drake said was near Disney World in Florida. Wilson's attorney, Herald Price Fahringer, called the loan agreement a "fraud," and said the money was to help set up the phony NSC company in the Dominican Republic.

Keiser testified that he was first contacted about helping to arrange Wilson's return by former CIA technician Kevin Mulcahy in the spring of 1981, and that he later met with Mulcahy at the office of former New York Times reporter Seymour Hersh in Washington.

He said that Hersh phoned the NSC during the meeting and that later in the day, he, Hersh and Mulcahy met in the White House situation room with former NSC director Richard V. Allen and White House counsel Fred Fielding.

Keiser testified that originally he was interested in helping Wilson "rehabilitate" himself, but later, after visiting Wilson in Libya early this year, decided Wilson should be brought back to stand trial.

Keiser said he had prepared a letter, on stationery bearing an NSC letterhead, giving Wilson assurances of safe haven.

One such letter was read to Wilson over the telephone by an associate, after which Keiser "put a match to it and flushed it down a toilet."

Later, Keiser testified, when he met Wilson in Zurich, Wilson wanted to see the letter. So Keiser prepared another letter in the airport and showed it to Wilson.

The letter prompted Wilson to board an airplane for Madrid. He later flew to the Dominican Republic and finally New York.