Dr. Andrew F. Hegyeli, 62, a program director at the National Cancer Institute who had been an area resident since 1969 and was a native of Hungary, died June 6 at Suburban Hospital after a heart attack. He lived in Bethesda.

Dr. Hegyeli moved to this area when he became a civilian employe of the Army. He was chief of an Army biomedical branch, first at Walter Reed Medical Center and then in Frederick. He joined the National Cancer Institute, part of the National Institutes of Health, in 1976. He was director of its carcinogenesis program at the time of his death.

He was the recipient of awards for research in comparative anatomy, blood coagulation, and hormone studies. He received the Outstanding Scientist Award from the Batelle Memorial Institute in 1966 for his work in cancer research. He had been a senior research pathologist with the institute in Ohio for four years before moving to Washington.

Dr. Hegyeli was a corporate member of the Marine Biological Laboratory at Woods Hole, Mass., where he did research work before joining the Batelle Institute. He was a fellow of the American Association for the Advancement of Science, and member of the American Physiological and American Chemical societies.

He received his education in Budapest, a bachelor's degree at St. Benedek College and two doctoral degrees, in veterinary medicine and comparative anatomy and pathology, both at Palatius Josephus University. A horseman, he served with the 1st Hungarian Cavalry Regiment in World War II. He came to this country in 1957 and joined the staff at Woods Hole.

Survivors include his wife, Dr. Ruth Hegyeli of Bethesda, and a brother, Dr. Zoltan Hegyeli of Las Vegas, Nev.