The movie is an action-thriller, with strong romantic elements, that explores the life of a rich businessman who suffers from anterograde amnesia following a violent encounter in which his love interest, model Kalpana was killed. He tries to avenge the killing with the aid of Polaroid Instant camera photographs and permanent tattoos on his torso.
The film opens with Sunita, a medical student, and her friends working on a project about the human brain. She wants to investigate the curious case of Sanjay Singhania, a (former) notable city businessman, who is reported to be suffering from anterograde amnesia. Her professor denies access to Sanjay's records as it is currently under criminal investigation. Sunita nonetheless decides to investigate the matter herself.
Sanjay is introduced as he brutally murders another man. He takes a polaroid picture of the man, and time-stamps it "done". It is revealed that Sanjay has a strange from of anterograde amnesia where his memory is wiped out every 15 minutes. Sanjay uses a system of photographs, notes, and tattoos on his body to recover his memory after each cycle. Every morning, Sanjay is reminded (by a tattoo on his body) that "Kalpana was killed", and it is revealed that Sanjay is ultimately out to avenge Kalpana, and that he is systematically killing the people who were responsible for Kalpana's death. His main target, evidenced by several notes and tattoos, is "Ghajini". It is eventually revealed that Ghajini is a notable social personality in the city.
Mumbai Police Inpsector Fawaz is on the case of the serial murders. He tracks Sanjay down to his flat and attacks and disables him. Fawaz is shocked by the extensive set of photographs and notes. He finds two diaries where Sanjay has chronicled the events of 2005 and 2006. The film enters flashback to 2005 as Fawaz reads the 2005 diary. Sanjay Singhania is the scion of a reputed business house that owns the Air Voice mobile telephone company. He has finished his education abroad and returned to take over the family business. In the course of his business, Sanjay sends his men to meet Kalpana, a struggling actor/model, about putting up an Air Voice billboard above her apartment. The owner of Kalpana's modeling/advertising firm misinterprets this as a romantic advance, and (in view of a possible lucrative Air Voice ad campaign and other benefits) encourages Kalpana to accept the overture. He promotes her to become the lead model. Kalpana is generally sweet and kind. She decides this is an innocent prank (that may fetch her better modeling work) and begins to play out the charade as Sanjay's girlfriend.
Sanjay eventually meets Kalpana, but tells her that he is Sachin, a simple fellow from a small town, looking to make a new life in the big city. Kalpana lands him some small modeling gigs. She is eventually enamored by his charms and Sachin is swept by her kindness and grace. (He notices on more than one occasion that she is always ready to help the invalid, the poor, and the destitute.) They fall in love, and Sanjay eventually finds the courage to ask her to marry him. She asks for some time to consider his proposal. Sanjay decides that if she accepts, he will reveal his true identity; and if she declines, he will quietly back off with no harm done.
The film returns to the present day when Fawaz is about to read the 2006 diary. Sanjay comes to, attacks Fawaz, and ties him up. He tracks down Ghajini to a college function where Ghajini is the guest of honor. Sanjay snaps some pictures of Ghajini and decides (although he does not know why) to kill him. He meets Sunita at the function; she recognizes him from the cover of his files and decides to befriend him. Later that evening, Sanjay attacks and kills one of Ghajini's goons in the parking lot. He lays in wait for Ghajini but ultimately decides to launch his final attack at another time. The dying goon informs Ghajini that Sanjay is out to kill him. Ghajini is baffled about why an unknown man (as opposed to a rival gang or a known hit man) is foolish enough to come after him.
In the meantime, Sunita visits Sanjay's flat and finds Fawaz, beaten and bound. She also finds that Ghajini is Sanjay's target. Fawaz informs her that Sanjay is a known serial murderer. Sunita finds the two diaries and frees Fawaz. Sanjay arrives suddenly; he remembers neither of them and chases them out. Fawaz is eventually hit by a bus, and Sunita barely escapes the crazed Sanjay. Believing Ghajini is in danger, she informs him that it is Sanjay who is after him. With this named target, Ghajini arrives at Sanjay's flat to kill him. He destroys all the photographs and notes, and has his goon subdue Sanjay and tattoo over (thus scratching off) all of Sanjay's existing tattoos. Satisfied that he has neutralized Sanjay by wiping out any trace that connects back to him, Ghajini leaves.
Meanwhile, back in her dorm, Sunita reads the 2006 diary. The film flashes back to 2006. It is revealed that Kalpana had accepted Sanjay's proposal. This diary ends abruptly. Sunita investigates further, and discovers that at some point in 2006, Kalpana was unwittingly pulled into a sinister prostitution racket. She was traveling by train when she came upon 25 innocent young girls being transported to Mumbai to work as prostitutes. She saves the girls. But the girls name Ghajini as the ringleader of the racket. Ghajini uses his ways and means (through corrupt cops and politicans) to silence the girls, and personally goes in search off Kalpana. Ghajini and his goons had broken into Kalpana's apartment and waited for her to return. Coincidentally, Sanjay arrived there to meet Kalpana. The goons attacked Kalpana. Sanjay was about to intervene when Ghajini hit him over the head with an I-beam. Her last word to him was "Ghajini". Sanjay's last vision was to witness Ghajini brutally murder Kalpana with the I-beam.
Sunita, now aware of the shocking truth, finds Sanjay and tells him the truth. He flies into an uncontrollable rage and goes after Ghajini. Arriving at Ghajini's lair in downtown Mumbai, Sanjay systematically and brutally kills all of Ghajini's henchmen and launches into a vicious chase-fight after Ghajini. He is about to kill Ghajini when his memory loss cycle kicks in. Ghajini turns about and stabs him. He begins to taunt Sanjay with the grisly tale of how he murdered Kalpana, when Sanjay, with a sudden burst of last minute strength, overpowers Ghajini. Sanjay kills Ghajini in the same way as Ghajini killed Kalpana.
The film ends with Sanjay, still suffering from the amnesia, volunteering at an orphange. Sunita gives him a small gift to remind him of his fond association with Kalpana.