Jab Tak Hai Jaan is a love triangle. It is the story of Samar Anand, an Indian who lives in London and manages to lead an average life. He shares a house with a Pakistani friend, Zain, who finds it difficult to get a job. But the golden-hearted man that Samar is, he helps Zain financially. In fact, it is in Samar's nature to spread joy and happiness all around. He meets and falls in love with Meera, an Indian girl who also lives in London with her father. Meera's mother had left her father and eloped with Imran, her lover. Meera is so fond of her father that she can't dream of hurting him. Meera's father fixes her engagement to her friend, Roger.
Meera has an equation with God whereby she always does barter deals with Jesus Christ. If she asks God for a favour, she does so by taking a vow that she'd do something in return if God granted her wish. Scared of hurting her father, she makes Samar vow along with her, in church, to not fall in love with one another. But soon, Meera finds that she, too, has fallen in love with him, after Samar makes her meet her estranged mother after a gap of nine years. Before Meera can tell her dad about her love for Samar, he meets with a near-fatal accident. Meera takes this accident as a punishment of God to Samar for Meera having broken her vow made to God. She prays for his life and, in return, vows never to marry Samar. His life is, in fact, saved. And Meera, in keeping with her promise to God, walks out of Samar's life after telling him about her vow.
Samar is dejected and depressed. He is very angry with God for having snatched away his beloved from him. Meera asks Samar to leave London for her sake, which Samar does. He returns to India and joins the army in keeping with the wishes of his family members and soon, becomes well-known for diffusing bombs. But he is a loner as he is unable to forget Meera. Years later, another girl, Akira, enters Samar's life. She is a rookie documentary filmmaker who has come to make a documentary on the soldiers. Akira is just the opposite of Samar. She is full of life, is not at all emotional and doesn't think twice before walking out on her boyfriend. She represents the modern generation. In her two-week stint with Samar and his men, she falls madly in love with Samar whose past love story she is aware of. Samar, of course, doesn't reciprocate her love although he realizes that she is a nice girl. Akira returns to London where she works. Samar is asked by Akira to come to London for just a day as otherwise, her documentary film would not get selected. At first, Samar is reculant because he does not want to go through the trauma of his breakup with Meera in London. But he obliges as he realizes that it is a question of Akira's future whose passion he admires.
As fate would have it, Samar meets with another accident in London. Although his life is saved, he suffers from retrograde amnesia. He seems to have forgotten the entire period between his first accident and the recent accident. That means, he doesn't remember a thing about his stint with the Indian army. He also does not recognize Akira while saving whom he had met with the accident. All he remembers is that he is married to Meera. Dr. Khan, the neurologist attending on him, asks Akira to get in touch with Meera, which she does. Meera is brought back into Samar's life so that he moves faster towards recovery. Meera has to pretend to be Samar's wife. But Meera is scared about her promise to God.
What happens thereafter? Does Meera help Samar in his recovery even at the cost of inviting God's wrath? Does Samar ever regain his lost memory? If so, how? And if so, who has helped whom - is it Meera who has helped Samar come close to Akira, or is it Akira who has unwittingly got Meera and Samar close to another? Was Meera married to Roger? Who ultimately unites with whom? Or does Samar die?