WASHINGTON (AP) _ The National Endowment for the Humanities named a 27-member advisory group Tuesday to help it examine how history and literature are taught in public elementary and secondary schools.

NEH Chairman Lynne V. Cheney said the panel ''will consider not only how the humanities are being taught in our schools and how they should be taught, but why they should be taught.''

The advisers include Daniel Boorstin, the Librarian of Congress; E.D. Hirsch, a University of Virginia English professor and expert on cultural literacy, and education historian Diane Ravitch of Columbia University's Teachers College.

The advisory group will meet three times over the next three months. Congress in 1985 ordered NEH to conduct a study on humanities in the public schools. The advisers' recommendations will feed into that report, due out later this year.

The other panel members are: William B. Allen, government professor, Harvey Mudd College, Claremont, Calif.; Janice Baker, English teacher, Baltimore School for the Arts, Md.; Glenn Brooks, dean, Colorado College, Colorado Springs, Colo.; Jo Bruno, principal, P.S. 189, Brooklyn, N.Y.; Ronald Calgaard, president, Trinity University, San Antonio, Texas; Nancy Coombs, teacher, Leal Elementary School, Urbana, Ill.; Charlotte Crabtree, professor, UCLA Graduate School of Education; Stephen Donadio, professor of American literature, Middlebury College, Vt.; John Drisko, history teacher, Falmouth High School, Maine; Leon Kass, biology professor, University of Chicago; Helen Lojek, professor of English, Boise State University, Idaho; Reginald MacDonald, superintendent of schools, South Portland, Maine.

Also, Maynard Mack, emeritus professor of English, Yale University; Constance Matthews, head of English department, Amherst-Pelham Regional High School, Amherst, Mass.; Robert M. Middlekauff, director, Huntington Library, San Marino, Calif.; Linda Miller, English teacher, Kellam Memorial High School, Mt. Kisco, N.Y.; James Morris, program director, Andrew W. Mellon Foundation, New York; Karen Munro, faculty coordinator, Evergreen State College, Olympia, Wash.; Richard Peters, history teacher, Mt. Vernon Community High School, Iowa; Ronald Sharp, English professor, Kenyon College, Gambier, Ohio; Helen Vendler, English professor, Harvard University; Bernard A. Weisberger, historian, Elizaville, N.Y.; Virginia Whatley, teacher, Oglethorpe Elementary School, Atlanta, and Gordon Wood, history professor, Brown University.