Bono has recalled how Dolly Parton "got out of her sickbed" to record what became her final vocal performance, saying U2 did not know at the time that she was critically ill.
The late country music star features with Bono on Torn, the closing track on U2's forthcoming album Carnaval De Luz.
Speaking after U2's surprise performance at Mount Temple Comprehensive School in Dublin, Bono said the collaboration had been particularly meaningful.
"We loved she would consider working with us, but she got out of her sickbed and sang her last song," he said.
"It was very meaningful for everyone involved."
Bono said the band had not realised the seriousness of Parton's illness while they were working together.
"We did not know she was critically ill," he said.
"She was still funny, even though she was ill. She was full of spunk and sort of sassiness about the song."
Parton died on 25 August aged 80 after bravely facing cancer.
Bono also reflected on Parton's ability to bring people together across political and cultural divides.
"This is probably the only thing the world can agree on," he said.
"It's the only thing, certainly in the US, the only thing they can agree on, across the spectrum: gay, straight, red, blue, wherever you are in the world, Dolly Parton is that person who brings people together."
He said U2 had previously worked with artists including Johnny Cash, Bob Dylan and Willie Nelson.
"We were aware she was extraordinary," Bono said.
Watch: U2 perform One with young musicians from Music Generation
He said Torn had begun with an idea from Parton herself.
"She started the song," he said.
"She said, 'I started a song called Torn, and you can take it somewhere else, and I might like to go where you want to take it.'
"And so we did."
The track was co-written by U2, Parton and Derry-born Snow Patrol musician Johnny McDaid.
Bono described the song as being about "kind of civil war at the kitchen table in the US", centred on two brothers fighting, but said its themes went far beyond America.
"It's so many kitchen tables around the world," he said.
U2 have confirmed that Torn turned out to be Parton's final recorded vocal performance.
It closes the 12-track Carnaval De Luz, which will be released on 13 November and is U2's first album of new material in nine years.