Samar Anand (Shahrukh Khan), a major in the Indian Army, defuses a bomb without fear or regard for his safety. Akira Rai (Anushka Sharma), a Discovery Channel filmmaker, later dives into a river in Ladakh and is rescued by him. Samar gives her his jacket and leaves before retrieving it. Akira finds his diary in the jacket pocket and begins reading.
The diary recounts Samar's earlier years as a struggling immigrant in London, working as a street musician who performs other menial jobs to support himself and his roommate Zain (Sharib Hashmi). Samar is working part-time as a waiter when he meets Meera (Katrina Kaif) at her and her fiance Roger's engagement party. Meera grew up, motherless, in an affluent Indian family; her mother (Neetu Singh) left for another man (Rishi Kapoor) when she was twelve. The dominant person in her life is her father (Anupam Kher), for whose company she works. Samar notices that Meera often prays when he sees her at the church. Samar and Meera begin to fall in love after a night of wild street dancing. To face her past, Samar takes Meera to visit her estranged mother and they reconcile. Some days later Meera decides to confess to her father about her relationship with Samar and break her engagement, Samar has a serious accident on his motorbike. Meera prays to God to save his life, promising never to see him again. Samar recovers, and Meera admits her vow to him. Angry, he leaves her and London. Samar challenges God to keep him alive while he risks his life every day, because he believes his death is the only way to make Meera lose her faith in God. He goes to India and enlists in the army, becoming a bomb-disposal expert.
When Akira finishes reading the diary, she obtains permission to make a documentary about a bomb-disposal squad. She asks Samar for help to make her film and becomes acquainted with him and his team. Akira develops a crush on Samar; however, he does not reciprocate because of his unresolved love for Meera. Akira makes a successful film and leaves for London. She wants Samar to visit the city to help her publicise the film; after he reluctantly agrees to come to London, he is struck by a car.
Samar is diagnosed with retrograde amnesia, and he remembers only the events before his first accident a decade ago. Concerned, Akira tracks Meera down and persuades her to aid in Samar's recovery. Meera agrees, pretending to be Samar's wife. In the meantime, Akira realises that Major Samar is only a fragment of the young Samar; he used to be happy and sociable, but is now bitter and lonely. One day Samar finds a bomb planted in the London Underground, and helps defuse it. The event jogs his memory, and he realises that Meera was lying to him. Samar confronts Meera with a choice: to be with him, or see him keep risking his life until he is dead. He then leaves for Kashmir, where he continues defusing bombs. During a conversation with Akira, Meera realises that her beliefs and prayers subjected Samar to a fate worse than death; realising her mistake, she goes to Kashmir and they reunite. Samar defuses his last bomb, and then proposes to her.