The Roman Catholic Church says the singer will perform hymns and sing with an 800-strong choir at an open-air papal Mass in Glasgow's Bellahouston Park on Sept. 16.
Benedict's four-day trip will be the first papal visit to Britain since Pope John Paul II in 1982.
Boyle will also sing "I Dreamed A Dream," the "Les Miserables" song that catapulted her to fame on the TV show "Britain's Got Talent." Her rendition of the song has been viewed millions of times on the Internet.
She told Scotland's The Daily Record newspaper on Wednesday that the invitation to sing for the pope is "my greatest dream come true."