The theatre’s artistic director Rufus Norris said that he lured The Night Manager star back to the stage over a coffee.
Olivia, 42, will appear in Mosquitoes, a new play by Lucy Kirkwood, which will have its world premiere in July next year.
Announcing the new work, Rufus said: “It centres on the relationship between two sisters. One is a leading scientist at the opening of the Large Hadron Collider.
“It’s about physics and the search for Higgs boson. There’s an incredibly lively and acerbic relationship between these two sisters and Olivia is playing one of the sisters.”
He added: “I think she’s a really terrific actress.”
He worked with Olivia on the film production of London Road.
“Since then I’ve been trying to woo her back into the theatre,” he said.
“I had a coffee with her not long ago and managed to trick her into stepping back over the line.
“When actors get that kind of success in TV and film, before you know it, five or 10 years have gone by without them being on stage.
“So it’s really important to get them back to keep that side of their craft up.”
The Broadchurch actress previously starred at the National in 2009 in the play England People Very Nice.
Norris will direct the new play.
Previously announced productions at the National Theatre next year also include Imelda Staunton in Follies, with music and lyrics by Stephen Sondheim.
Nathan Lane, The Amazing Spider-Man actor Andrew Garfield and Russell Tovey all star in Angels In America.
The theatre recently announced a “national listening project… a verbatim archive of conversations from across the UK” which took place in the days after the EU Referendum in June.
A performance based on the first round of material, created in collaboration with poet Carol Ann Duffy, will be entitled My Country: A Work In Progress.