Plot Late at night on a deserted road, well-known actor Armaan Kapoor (Vivan Bhatena) loses control of his car for no evident reason, apparently trying to avoid something, and drives into the sea. Inspector Surjan Shekhawat (Aamir Khan) with his assistant Devrath Kulkarni (Rajkummar Rao) begins an investigation into Armaan's death. Surjan's personal life is in turmoil since his 8-year-old son, Karan, drowned recently during a family outing. His wife, Roshni (Rani Mukerji), is still grieving and Surjan has developed a guilt complex.
Surjan learns that on the night of Armaan's accident, Armaan was travelling with 2 million rupees in cash, which is missing from the car. Armaan had given the money to a blackmailer, a pimp named Shashi (Subrat Dutta). Three years back, Shashi had performed a cover-up for Armaan and his friend Sanjay Kejriwal (Suhaas Ahuja). Once he learns of Armaan's death, Shashi takes off with the cash, leaving behind a mistress, Mallika (Aditi Vasudev). Shashi's friend, Tehmur (Nawazuddin Siddiqui), steals Shashi's discarded sim card. Shashi begins blackmailing Sanjay. In panic, Sanjay employs some thugs to murder Shashi. Tehmur begins to use Shashi's old sim card to blackmail Sanjay with Shashi's murder.
Meanwhile, Roshni seeks solace from a medium (Shernaz Patel) who is in touch with Karan's soul. One night, Surjan is propositioned by an escort, Rosie (Kareena Kapoor). He declines Rosie's advances but asks her if she can become an informer. Through Rosie, Surjan finds out about Shashi's connection with the case. The police find Shashi's body, along with the blackmail money and a DVD. The DVD contains embarrassing CCTV footage of Armaan and his friends leaving a hotel with a girl. Convinced of Armaan's link with prostitutes, Surjan focuses his search on the slums near the Hotel Lido. To speak unobserved, Rosie takes Surjan to a quiet place by the riverside and tells him that three years ago, she was picked up by Armaan and his friends, Sanjay and Nikhil (Prashant Prakash). However, she doesn't reveal anything more. Surjan tries to approach Nikhil for more information but discovers that Nikhil has been brain-dead after the incident three years ago. After a heated argument with Roshni, Surjan confides in Rosie, who comforts him by taking him to the Lido.
Tehmur is killed by the two thugs in Sanjay's employ. One of the thugs is captured by the police and reveals that Sanjay has been behind the murders of both Shashi and Tehmur. Surjan arrests Sanjay, who confesses that three years ago, Sanjay, Armaan and Nikhil had picked up an escort to celebrate Nikhil's birthday. While driving, Nikhil began making out with the girl in the backseat. The car door opened by accident, throwing both Nikhil and the girl from the moving car to the road. Both were badly injured. Armaan and Sanjay rushed Nikhil to the hospital but fearing scandal, left the girl unattended on the road. Sanjay had called Shashi to ask him to take care of her. However, Shashi informed them that the girl had died and that he had footage of the three leaving with her. Since then, Shashi had continued to extort money from them by blackmail.
Surjan re-watches the footage and realizes that the girl is Rosie. As he drives Sanjay to the police station, they approach the same road where Armaan had his car accident. Both Surjan and Sanjay see Rosie standing ahead. In a re-enactment of Armaan's accident, Sanjay swerves the car into the sea. With Sanjay already dead, Surjan struggles to get himself out of the car. Rosie appears underwater and saves him. At the police station, Surjan's superior advises him against reporting his incredible story. Surjan agrees to write in the official report that Armaan Kapoor's death was an accident. He returns to the riverside place where he used to meet Rosie and uncovers her remains where Shashi had hidden her body. Remembering that he had been told that "the dead come to those who are troubled," he gives her a proper funeral.
Now more accepting of the supernatural, Surjan finds a letter from Karan, penned by the medium. Through the letter, Karan tells Surjan not to blame himself for his death and that he wants both his parents to be happy. Surjan cries and Roshni consoles him. The two are reconciled.
In a post-credits scene, two workers are seen putting a caution signboard on the same accident spot.