Farhan Akhtar originally wrote the movie by casting Akshaye Khanna as Akash, Hrithik Roshan as Siddhart and Saif Ali Khan as Sameer. When Hrithik Roshan turned the role down, it went to Abhishek Bachchan. After Abhishek's exit, Farhan approached Aamir Khan who was going though a lean phase at the time. Aamir Khan insisted on playing Akash and Akshaye Khanna graciously agreed to swap roles.
Aamir Khan's ex wife Kiran Rao plays Deepa's friend in the scene when Khan's character hides behind the plant.
The scene where Sid comforts Deepa by telling her his philosophy about "it being impossible to grasp the grains of sand with a tighter clasp" is a subtle homage to the poem 'A Dream Within A Dream' by Edgar Allan Poe.
Producer's and Director's opened offers to Saif Ali Khan and Akshay Khanna's declining career after the success of this film.