The Maryland medical society is expected today to approve a recommendation that heroin be used to help ease the pain of dying and terminally ill people.

Although the use of heroin in medical treatment is currently prohibited by federal law, several states, Maryland among them, are beginning to push for changes in laws that severely restrict the medical use of heroin.

The vote by the state medical society moves physicians a step closer to having their arguments for use of the powerful but addictive painkiller considered by state and national policiticans.

The resolution calling for the legalized use of heroin in Maryland will be presented to the state medical society by the mental health committee of the Montgomery County Medical Society.

Dr. Henry C. Mellette, who is chairman of the Committee, said he is certain that the proposal will be approved by the 150-member House of Delegates of the Medical and Chirurgical Faculty of Maryland.

"I expect there will be some debate," Dr. Mellette said. "But most of the physicians I've talked with are in favor of the use of heroin in the treatment of extreme pain."

John Sargent, executive director of the Medical and Chirugical Faculty, said he also expects the stae society to adopt the resolutions.

"Yes, it will go through," he said. "It has been amended so that heroin will not be availale on prescription - only through authorized, approved facilities such as hospitals and drug abuse clinics."

Dr. mellette said that the American Society of Internal Medicine, which represents 15,000 physicians, has already approved a resolution endorsing the medically supervised use of heroin for the treatment of suffering and "intractable pain" in terminally ill patients.

Legislative proposals favoring the medicinal use of heroin have also been made in hawaii and New York state, according to Judith Quattlebaum, who is chairwoman of the National Committee for Intractable Pain.

However, these state proposals would have little effect even if approved, because federal laws would still prohibit the drug's use.

Dr. Robert N. Butler, director of the National Institute on Aging, said that one widespread objection to the legalized use of heroin is that the drug would generate new cases of drug addiction.

But Dr. Butler said that addiction is not a concern in dying patients, "But relief from pain is."

President Carter's health advisers, Dr. Peter Bourne, said the Carter administration adopted a policy a year ago to investigate the value of heroin in the treatment of severe pain.

"We thought this was an appropriate thing to do," said Dr. Bourne. "We thought the value of any drug for therapeutic purposes should be based on scientific research."

"Our previous policy (on heroin use) was based on emotion," he said, "largely because the drug has a history of abuse."