The next-generation Russian submarine Sevastopol employs an advanced AI for testing a new navigation system that uses dead reckoning. The AI tricks the crew into firing a torpedo and then turns the torpedo back on the submarine, sinking it and killing all aboard.
IMF agent Ethan Hunt travels to the Empty Quarter of the Arabian Desert to retrieve half of a cruciform key from disavowed ex-MI6 agent Ilsa Faust, on whom the IMF has placed a bounty. He then infiltrates a meeting of leaders of the U.S. Intelligence Community in Washington, D.C., including CIA Director Eugene Kittridge and Director of National Intelligence Denlinger, to discuss the rogue AI. Calling it the Entity, they recount how it has achieved sentience and infiltrated the major defense, intelligence, and financial networks of the world. World powers compete to obtain the key to protect their national security and control the Entity, though the exact means of controlling it are unknown. Believing the Entity poses too great a threat to humanity, Ethan seeks to destroy it.
He and his teammates Benji Dunn and Luther Stickell travel to Abu Dhabi International Airport to intercept the holder of the other half-key. Ethan evades US agents as well as Gabriel, an Entity liaison and terrorist with ties to Ethan's pre-IMF past, while the half-key is stolen by a professional thief named Grace. Luther identifies a suspicious piece of baggage; Benji finds what appears to be a nuclear explosive, but finds it empty after narrowly defusing it. Ethan pursues Grace to Rome. After a lengthy chase, Grace escapes again, while Ethan reunites with Benji, Luther, and Ilsa. Ilsa informs him that she is involved in this because a group of MI6 agents, her former colleagues, determined that they must prevent the key from falling into British Government hands since their government seeks to control it rather than destroy it.
With Benji and Luther providing support, Ethan and Ilsa infiltrate a party held by the arms dealer Alanna Mitsopolis in Venice, hoping to find who hired Grace and learn of the key's purpose. Grace encounters Gabriel and learns that Alanna hired her to steal the half-key. Ethan unsuccessfully attempts to dissuade a fearful Alanna from selling it. Gabriel reveals that the Entity has infiltrated the party and determined that one of Ethan's allies, either Ilsa or Grace, will die. They all scatter afterward, with Ethan subduing but sparing Gabriel's subordinate, Paris, while Gabriel subdues Grace and seemingly kills Ilsa, devastating Ethan. A remorseful Grace commits to joining the IMF and agrees to impersonate Alanna as they prepare to board the Innsbruck-bound Orient Express, where she will meet with her buyer. Luther leaves for an off-grid location to investigate isolated traces of the Entity in his hard drive, warning Ethan not to kill Gabriel out of vengeance, as only Gabriel knows how to use the key.
On the train, Gabriel kills the engine crew and destroys the throttle and brake. He meets Denlinger, who proposes an alliance between himself and the Entity. Denlinger explains that the Entity was originally an advanced cyber weapon developed by the United States that "overperformed" when it infiltrated the Sevastopol and subsequently went rogue. He reveals that the complete key unlocks the chamber housing the computer of the Sevastopol, which contains the early version of the Entity that can be used to control or destroy it, once and for all. Gabriel kills Denlinger and, suspecting Paris will betray him after Ethan spared her in Venice, attempts to kill her as well. Impersonating Alanna, Grace brings the complete key to Alanna's buyer, revealed to be Kittridge. Though tempted to betray Ethan for $100 million and protection for herself, Grace decides against it, pickpockets the key from Kittridge and flees. Ethan parachutes off a cliff onto the train to save Grace from her pursuers, but Gabriel acquires the key.
Ethan overpowers Gabriel atop the train, but the latter escapes and detonates a bridge ahead. Grace and Ethan detach the locomotive from the rest of the train, which trips a fail safe which saves the passengers. A revived Paris rescues them from falling off the bridge and reveals the key's connection to the Sevastopol. Grace informs Kittridge of her new commitment to the IMF, which he accepts while Ethan flees the train with the complete key, which he had pickpocketed from Gabriel during their skirmish.