WASHINGTON - A large military spending bill moving through Congress contains a little-noticed outlay for Boston that has nothing to do with national defense: $20 million for an educational institute honoring late Senator Edward M. Kennedy of Massachusetts.

The earmark, tucked into the defense bill at the request of Senator John F. Kerry of Massachusetts, requires US taxpayers to help the Edward M. Kennedy Institute for the United States Senate realize its goal of building a repository for Kennedy’s papers and an accompanying civic learning center on the University of Massachusetts at Boston campus in Dorchester, next to the John F. Kennedy Library and Museum.