In the Dasht-E-Margoh desert in remote Afghanistan, inside a Taliban camp, ISI official Col. Huzefa (Shahbaz Khan) is interrogating a captured man (Saif Ali Khan) suspected to be a Research and Analysis Wing (RAW) agent. The man gives details of RAW's operations in Afghanistan in exchange for money and safe passage across the border. He betrays his colleague, Major Rajan (Ravi Kissen), who has also infiltrated the camp. This is only a ruse, as both overpower their captors and fight their way out of the camp. Along the way, they rescue a girl called Farah (Maryam Zakaria). The man is actually a RAW agent and his nom-de-guerre is Agent Vinod.
In New Delhi, Agent Vinod enters RAW headquarters to meet his boss Hassan Nawaz (B. P. Singh). Nawaz shows him Major Rajan's final message from Russia. Just as he completes his message, Rajan is killed by a man. Nawaz asks Vinod to find out what '242' is. Vinod travels to Moscow, and enters a nightclub owned by Abu Nazer (Ram Kapoor). He manages to capture and interrogate Nazer, who tells him a man called Freddie Khambatta is to smuggle the million to Morocco. Vinod is almost captured by Nazer's men, but manages to escape, killing Nazer in the process.
Vinod boards a flight to Marakkesh, Morocco. Freddie Khambatta turns out to be the flight steward. Vinod picks him up from the airport, only to assume his place. As Freddie, Vinod meets local mafia boss David Kazan (Prem Chopra), who is accompanied by his personal (Pakistani) doctor, Ruby Mendes (Kareena Kapoor). Kazan suspects Vinod, and gets Ruby to administer him a truth serum. Vinod blurts out that he is a RAW agent and killed Abu Nazer. Kazan confronts Vinod when he regains consciousness, but Vinod manages to convince him he is Freddie Khambatta, and explains he had to kill Abu Nazer to protect the mission. He manages to hack Kazan's phone and find out that a MI6 agent, is reaching Morocco the following day.
In the meantime, Vinod gets closer to Ruby, and tries to find out what '242' is. Ruby is actually Iram, a British-Pakistani who is working undercover for the ISI. Vinod goes to meet the MI6 agent and finds him murdered in his room with strong pointers that the murder was committed by Ruby. He gets an invitation card from the murdered agent's room for a private auction. He learns that many international terrorist groups are converging at an antiques auction in Marakkesh to purchase '242'. Vinod brings Ruby to the auction, where Kazan is also present along with Jagadishwar Metla (Dhritiman Chatterji). Vinod spots an LTTE agent, he had encountered previously, and from him, learns that '242' is actually the detonator for the nuclear device, disguised as an antique volume of Omar Khayyam's 'Rubaiyyat'. A bidding war ensues, and Kazan manages to secure the detonator.
In Chaman, Baluchistan, the head of the ISI is murdered by Col. Huzefa, who is actually part of a group of rogue ISI colonels planning an attack on India. In Morocco, Kazan locks the detonator with a password and hands it over to Colonel (Adil Hussain), who has arrived in Morocco. Iram runs into the real Freddie Khambatta, and finds out Vinod is a RAW agent. Managing to escape from men trying to kill them, both agree to work together to prevent the nuclear device from falling into the wrong hands. Ruby returns to Kazan's estate only to find it ransacked and Kazan shot dead by 'Colonel'. 'Colonel' captures Ruby and asks her to reveal the whereabouts of Agent Vinod. He plants a sniper next to the hotel where Agent Vinod is to rendezvous with Ruby. The sniper takes a shot at him but Vinod manages to escape and is admitted to a hospital. The assassin reaches the hospital in the guise of a doctor and tries to administer a venom injection to Vinod. Vinod spots the scorpion tattoo on the doctor's forearm and overpowers him, killing him. He then clears his way out of the hospital to find Iram.
'Colonel', who is now in possession of the detonator, has reached Latvia to acquire the bomb. He enlists Iram to seduce an airport security employee to get his ID card. Iram succeeds in doing so, and 'Colonel' provides the ID card to his man, who is to transport the bomb out of Latvia. Colonel also sets up a rigged bomb so that both the airport employee and Iram die in the blast. Vinod arrives and as he interrogates Iram, the blast occurs, giving Iram the realisation that she was being set up by the Colonel.
Vinod and Iram join hands and try to capture the Colonel and the bomb. Iram tells Vinod that the Colonel has called for a meeting in Karachi with fugitive don Pasha (Gulshan Grover) who may also be in on the plot. The Colonel gets the Rubaiyat and tells his men to kill Vinod and Iram. However, Vinod manages to kill them all. Iram and Vinod reach Karachi, where they meet Farah, who is a dancer. With her help, they enter the wedding being attended by Pasha. There, they learn that Col. Huzefa and the don have agreed to smuggle the nuclear device from Karachi into India via the sea route. However, they are captured by Col. Huzefa, from whom they learn the target of the bomb in New Delhi. They manage to escape and make it to New Delhi, where they try to find the location of the bomb. They find that the Colonel is staying with an ISI/Lashkar agent, who is an old professor. Iram finds the professor's map, which is on the bus route that Jimmy is taking with the armed bomb.
Iram hurries to the exhibition where Colonel is hiding as a pilot. Iram runs into 'Colonel', and is shot, but points him out to Indian security forces, who kill him. Eventually, Vinod tracks down the bomb and takes the bomb up in a helicopter to detonate it as far away from the city as possible. Iram realises that David Kazan had set the password to the detonator and asks Vinod to try the name of Kazan's camel. The bomb is defused but Iram dies of gunshot wounds. Later Vinod sees a recording, showing Met planning the attack. Vinod accuses Metla and the Zeus group for murdering millions for making money on the global stock exchanges and starting a nuclear war in the sub-continent for geo-political reasons. Metla mocks Vinod, telling him world affairs are too complex for 'lowly police officers' to understand. However, Vinod is wearing a wire, and the London cell of the Lashkar-e-Toiba are listening in. Realizing that they have been manipulated by Metla into almost starting a war with India, with the Pakistan government violently cracking down on them, the Lashkar sends a suicide bomber (Arif Zakaria) to assassinate Metla at a function in his honour. Metla is killed, but posthumously feted as a great philanthropist.
On a beach in Cape Town, the beautiful Russian girl who first acquired the nuclear device is seen sunbathing. She looks up to find Agent Vinod smiling at her. It is apparent Vinod has moved on to his next mission.