Virginia and U.S. prosecutors both have decided against charging former White House drug adviser Dr. Peter G. Bourne for writing a false name on a drug prescription.

Prince William County Commonwealth's Attorney Paul B. Ebert said yesterday that Bourne "has not violated the laws of the Commonwealth of Virginia."

Ebert said the criminal charge he had considered bringing against Bourne, conspiracy to commit a felony, cannot be made in drug violations committed outside Virginia.

"If he had done what he did in Virginia," he would have violated the law," Ebert said in an interview.

A spokesman for the U.S. attorney's office in Washington, where the prescription was written, said yesterday, "We originally deferred to Virginia authorities to decide whether to prosecute or not in this case. They've made their decision and as far as this office is concerned, that's the end of the matter."

Bourne, who resigned July 20 as President Carter's chief adviser on health and drug abuse, admitted he wrote a fictitious name on a prescriptio for the sedative Quaalude.

He said the drug was prescribed for his administrative assistant, Ellen Metsky, who he said had "a real medical problem." The fictitious name was used, Bourne said, to protect Metsky's confidentiality.

In a statement yesterday, the 38-year-old psychiatrist said he was "gratified . . . that the facts in this matter warranted no legal action." Bourne defended the use of the fictitious name, saying, "I took what I thought to be legitimate steps to protect (Metsky's) confidentiality in a unique and difficult setting."

In a later interview, Bourne added that "what is good medical practice is not necessarily good politics."

Under the pressure of massive publicity that Bourne yesterday called oppressive, the drug adviser resigned his White House post within 36 hours of the disclosure that Toby M. Long, 26, a friend of Metsky's, had been arrested in suburban Woodbridge on July 11 for allegedly trying to fill the Quaalude prescription.

The resignation led to news accounts of drug use among some White House staff members and prompted President Carter to dispatch a terse memo to his staff on July 25 stating that he expected "every member of the staff to obey the law. Whether you agree with the law or whether others obey the law is totally irrelevant."

Long, who Ebert said is "the least culpable of the bunch," is scheduled to appear in Prince William County General District Court on Sept. 19 for a preliminary hearing on a felony charge of "uttering a fictitious prescription."

Ebert said polygraph tests given to Metsky and Long this month convinced him Bourne did not know that the Quaalude prescription would be presented in Virginia, nor did he know that someone other than Metsky would try to fill the prescription.

The polygraph detected no evidence that Metsky was lying, when she aswered the following questions:

Q. Did you intend to use that medicine for other than legitimate reason?

A. No.

Q. Prior to July 1978, have you obtained any illegal prescriptions from Dr. Bourne?

A. No.

Q. Have you given Officer (James) Fry (of the Prince William County police) a true and accurate statement about the prescription?

A. Yes.

Ebert also said no charges will be brought against Metsky, who has said she asked her friend Long to fill the prescription because she did not have time to have it filled herself.

Long, a physical therapist for the Prince William County school system, allegedly tired to have the prescription filled at the People's Drug Store in Marumsco Shopping Center.

A Virginia State Pharmacy Board inspector who happened to be in the drug store called the phone number listed on the prescription, then called in county police to report a "suspicious event."

Ebert said yesterday he believes that Long was "doing a favor for a friend," and said he may dismiss charges against her or ask that she be placed on probation.

The prosecutor, a Democrat up for re-election next year, said it took him a month to decide against prosecuting Bourne because he had to research Virginia law and interview Bourne, Long and Metsky. Bourne was not given a lie detector test, according to his lawyer, Charles Morgan Jr.

Bourne, who said yesterday the events surrounding his resignation were the most tumulutous of his life, said that he has no immediate plans for the future.

He said he intends to continue living in Washington, where his wife, Mary King, is deputy director of ACTION, a federal antipoverty program.

"I anticipate I will do substantial amount of writing in those areas where I have recognized leadership role, such as international health, world literacy and national health insurance," he said.

The English-born psychiatrist, who was reported personally close to the President and First Lady Rosalynn Carter, said he has received many calls in the past month from "the statesmen of politics" advising him not to "in any way lessen (his) committment to public service."

Bourne declined to say if he had had any contact with Carter or any members of the White House staff since his resignation.

King, yesterday issued a statement from her office which said, in part, "All he (Bourne) was trying to do was practice good medicine and protect a confidence. He has shown remarkable courage and a sense of honor."

Franc Ferraraccio, executive director of the Medical Society of the District of Columbia, yesterday called Bourne's writing of a false prescription "unprofessional. When you are dealing with a controlled substance, there is no way you can falsify a prescription," he said.

Quaalude is a powerful drug used under a phsycian's directon to produce sleep or sedation. The drug often is abused to people who claim it is an aphrodisiac.

Last week, the board that licenses doctors in Georgia, where Bourne is licensed to practice medicine, authoritized an investigation of the circumstances surrounding of the Bourne's writing of the Quaalude prescription.