Elizabeth Hamer Kegan, 67, retired assistant librarian of Congress for American and library studies, died Friday at Alexandria Hospital after suffering a heart attack at her home in Alexandria.

She retired last year after 27 years as an official of the Library of Congress. She started as information and publications officer, became assistant librarian for public affairs, then was appointed assistant librarian of Congress in 1963. She was named to her last position in 1976.

As assistant librarian of Congress, Mrs. Kegan helped direct the library's information, exhibits, publishing and international visitors programs. She also was responsible for coordinating its relations with Congress and the White House.

In her last position, she had responsibility for Bicentennial programs, for the Permanent Committee for the Oliver Wendell Holmes Devise and its "History of the Supreme Court," and for the newly established American Folklife Center. In 1977, the American Revolution Bicentennial Administration awarded her a Freedom Bell.

Mrs. Kegan had represented the library on numerous commissions and committees.

These included the National Historical Publications and Records Comsion, the American Revolution Bicentennial Commission and the Federal Agency Bicentennial Task Force. She was the liaison with the former Madison Memorial Commission, a delegate to the 1965 White House Conference on International Cooperation, and a former member of the Advisory Committee on the Archives of the Rockefeller Foundation.

As a member of the International Council on Archives, she participated in a number of world conferences. She also was a member of the International Federation of Library Associations.

Mrs. Kegan was a founding member and former president of the Society of American Archivists. She belonged to the American Library Association, the American Historical Association, the Organization of American Historians, the Southern Historical Association, the National Trust for Historic Preservation and the Manuscript Society.

She had served on the board of trustees of the Greater Washington Educational Television Association Inc. and was made an honorary trustee in 1966.

Mrs. Kegan was born in Copperhill, Tenn. A graduate of the University of Tennessee at Knoxville, she also took graduate work there and at the University of Chicago and American University.

In 1936, Mrs. Kegan joined the staff of the Survey of Federal Archives in the States, sponsored by the National Achives. She was research assistant, editor and then editor-in-chief of the survey's multivolume guide, "Inventory of Federal Archives in the States." She went on to become chief of the exhibits and publication section of the National Archives and Records Service.

Mrs. Kegan's first husband, Philip May Hamer, former director of the National Historical Publications Commission, died in 1971.

In 1973, she married Lawrence Robert Kegan, president of the Population Crisis Committee, who survives her.

The family suggests that expressions of sympathy be in the form of contributions to the Elizabeth Hamer Kegan Fund for the American Folklife Center at the Library of Congress.