Suhaan (Salman Khan) and Piya (Preity Zinta) fell in love in college and eloped. However, he has to keep his marriage a secret in order to further his career as a movie star and, when his career hits a low, he returns home to find out that she has left him. She does not answer his calls or letters, and he soon receives divorce papers in the mail.
The film begins when Suhaan receives a notice saying his ex-wife Piya, who has settled in New York, wants a divorce settlement of 5 million rupees, since he failed to make his alimony payments due to his poor financial condition. Suhaan appeals to his uncle Boney (Anupam Kher), a midget lawyer, for help. As they try to figure out a solution, Agastya Rao (Akshay Kumar) lands at their doorstep searching for Piya. He reveals to them that he fell in love with Piya during his college days but could not express his love to her because she was in love with someone else, unaware that the person he lost her to was Suhaan. Piya had ignored Agastya then, a nerd, a nobody, and even broke his heart by blowing him off to be with Suhaan at a concert that Agastya had taken her to. A heartbroken Agastya left the college as a result and eventually wound up in Houston working for NASA.
Suhaan and Boney hatch a plan to get Agastya and Piya together, so that Suhaan need not pay alimony to Piya and Agastya gets the girl of his dreams. Suhaan accompanies Agastya to New York City to help Agastya win Piya over. They rent an apartment opposite Piya's and watch her every move, literally, using telescopes, binoculars, and surveillance techniques. Using a headset, Suhaan feeds Agastya lines to woo Piya with and eventually succeeds in getting Piya and Agastya together.
One night, Suhaan finds out Piya has a baby girl, Suhaan's daughter. He realises that she left him since she did not want her and the baby to ruin Suhaan's film career. Suhaan realises his mistake and tries to make amends and start a new life with Piya and his daughter, Suhani. Unfortunately, before he can act, Piya gets engaged to Agastya.
It later emerges that Piya's brother, Vishal, had been hiding letters that Suhaan wrote to her and was responsible for initiating the divorce process. Agastya realises Piya is still in love with Suhaan and not him; so he reveals the truth and tells her to be with Suhaan. Piya flies back to India where Suhaan is trying to find work a small-time actor. They express their mutual love, reuniting their broken family.
A few years later, Agastya is on a NASA space shuttle and initiates a video conference with Suhaan and Piya. He introduces them to his new girlfriend who looks strikingly similar to Piya, Preity Zintakova (a spin-off of Preity Zinta, who plays Piya).