The duo — who had been dating since 2003 — confirmed their split in early January.
Diaz, 34, and Timberlake, 26, embraced just before stepping onto the green carpet before a large crowd in London's glittering Leicester Square.
"We're friends. It's good to see him," said Diaz. She voices Princess Fiona in the DreamWorks animated blockbuster.
"It's great having him around. We've not been able to sit down and have a chat yet we've been so busy," Diaz said.
Timberlake, who voices the future King Arthur, said of the premiere: "It's massive, it doesn't get any bigger than this, I don't think."
Asked about his love life, Timberlake joked: "I'm allergic to those type of questions."
The tale of the green ogre who married a princess opens in Britain on June 29.