The actress beat Felicity Jones and Evangeline Lilly to the lead role as the wife of Jack Ryan (Chris Pine), according to The Hollywood Reporter.
It was first reported last week that the trio were in the running for the role, with Knightley as the frontrunner.
Total Recall co-stars Kate Beckinsale and Jessica Biel were also said to have tried out for the part.
The film follows Jack Ryan, an ex-Marine-turned-financial analyst in Moscow, who uncovers a plot by his employer to finance a terrorist attack designed to collapse the US economy.
The movie is based on the CIA analyst character in Tom Clancy's novels, which spawned four previous films that starred Alec Baldwin, Harrison Ford and Ben Affleck.
Pine and Knightley's film is a prequel to Clancy's novels.
Knightley last starred in Seeking a Friend for the End of the World and can be seen next in Anna Karenina.
Anna Karenina will arrive in theatres on September 7 in the UK, and November 9 in the US.
Watch the trailer for Anna Karenina below: