The royals arriving to sign a condolence book at the South African embassy
He told BBC Radio: "The Duchess Kate, sort of turned to me and looked at me as she had her phone and I wondered what was wrong with her because she looked quite emotional, but the film's very emotional.
"And my girlfriend looked at me and handed the phone and I looked down and there it was, Mandela had passed."
The actor described it as "surreal" sharing such a key moment with William and Kate. "I looked back at Prince William and Kate and they were just in tears with me. It was just odd, very odd."
Idris explained that the message came at a very significant moment in the script.
"There's a moment in the film where I play older Mandela and he says this one line and it is 'Just open the gate and let me free,' and I kid you not, that was the one line when we heard the news."
Idris Elba at the funeral of Nelson Mandela
After the film's screening, he stood up to announce to the audience what had happened.
"It only felt appropriate to say what had happened and honestly there was an audible gasp in the auditorium," he said. "Some people didn't know, they had their phones off. It was just very surreal. Bittersweet."
As they left the auditorium the Prince was asked for his reaction. With his wife looking desperately sad besides him, he paid tribute to the elder statesman saying: ""It is extremely sad and tragic news. We were just reminded of what an extraordinary and inspiring man Nelson Mandela was."
He added: "My thoughts and prayers are with him and his family."