In a real switch of roles, someone has given the National Endowment for the Humanities a grant for one of its own programs.

NEH's man-bites-dog announcement yesterday said the Andrew W. Mellon Foundation has granted $500,000 to the endowment for its summer seminars for secondary school teachers. Staffers at both endowments believe this is the first time NEH has been given money to support a program it organized.

"It's extraordinary," said NEH chairman William J. Bennett. He initiated the teacher seminars shortly after he became chairman, in December 1981, expressing his interest in "excellence in education" through going "back to basics."

Following the philosophy of gratefully accepting all money offered, Bennett said he would "invite but not coerce" other foundations and philanthropists to support the teacher seminars and other endowment-created programs, including one that gives fellowships for secondary school teachers. "I think this is what the endowment should be doing, pointing the direction. We have set up model programs; we hope others will find them worthy."

Bennett said the "Mellon foundation has always supported the best things in the humanities. Secondary school education is a concern of theirs. I know them well from when I was director of the National Humanities Center. So last fall, they invited us up to New York to describe the program. They were very enthusiastic when we told them about it."

In the seminars, teachers of the seventh through the 12th grades study at least one great book: Plato's "Republic," Chaucer's "Canterbury Tales," "The Federalist Papers" or another important work of English literature, history or philosophy. The seminars are led by notable scholars. More than 2,500 teachers applied for the 225 places in the first 15 seminars held this summer at colleges and universities. With the Mellon grant, the endowment will be able to hold 50 instead of the planned 40 seminars next summer.

Mellon Foundation president John E. Sawyer praised the program for "revitalizing teaching in the humanities."