Nakulan and his wife Ganga decide to take a vacation to Nakulan's ancestral village in Kerala. Despite warnings from elder family members, Nakulan insists on staying at his ancestral home, the Madampalli Tharavad, which is apparently haunted. The rest of the family join them, not willing to leave them alone there. The couple is cautioned to avoid certain parts of the house, particularly the Thekkini, a locked room.
About 150 years ago, the family's patriarch and the ruling feudal lord, Karnavar Sankaran Thambi, fell in love with dancer Nagavalli during a trip to Thanjavur, and brought her to the mansion. However, Nagavalli was already in love with dancer Ramanathan, who moved into the nearby house and continued seeing her. When the Karnavar discovered the affair, he killed them and legend has it that Nagavalli's vengeful spirit is in the Thekkini.
A skeptical and curious Ganga enlists the help of Nakulan's cousin Alli, to unlock the Thekkini. After they unlock it, people start seeing apparitions of a woman, objects mysteriously break, and Ganga's sari catches fire. Performing puja does not help and the family eventually begins to believe that another of Nakulan's cousins, Sreedevi, may be possessed by Nagavalli's spirit.
Nakulan calls on his friend Dr. Sunny, a renowned US-based Indian psychiatrist, to investigate the situation. Sunny soon encounters mysterious events, including an attempt on Alli's life, as well as a woman's voice singing and dancing in Tamil emanating from the locked Thekkini at midnight. Impersonating the Karnavar, Sunny converses with the voice, who reveals herself as Nagavalli and vows revenge on the upcoming Durgashtami night by killing the Karnavar. Sunny also goes to a place called Evoor and talks to the people there. He also foils someone's attempt to kill Nakulan by giving him poisoned tea and blaming Sreedevi, locks her up in her bedroom.
On the night before Durgashtami, Sunny finds Ganga supposedly being harassed by Alli's fiancé, Mahadevan, who insists that he is innocent. Sunny deduces that Ganga is orchestrating all the problems in the house and is suffering from dissociative identity disorder which has taken on the personality of Nagavalli. The Nagavalli persona perceives Mahadevan as Ramanathan and Nakulan as Karanavar, and wants to kill Nakulan on Durgashtami night. Sunny explains everything to Sreedevi who starts to help him. Meanwhile, Nakulan's family, skeptical of Sunny's treatment, calls in tantric expert Pullattuparam Brahmadathan Namboodiri, but it turns out he is an old friend of Sunny's and decides to help Sunny cure Ganga.
On Durgashtami night, Ganga reverts to her Nagavalli persona and, believing Mahadevan to be Ramanathan, follows him to the rituals prepared by the Namboodiri to the shock of everyone. The Namboodiri speaks to Nagavalli and promises to help her behead the Karnavar. Nakulan is brought before her, but just as she prepares to strike, the Namboodiri blows smoke and ash into her face, temporarily blinding her; meanwhile, Sunny swaps Nakulan with a dummy. The Nagavalli persona cuts the dummy into pieces, and convinced that her enemy is dead, becomes dormant. Later, Sunny uses therapy to cure Ganga.
The family bids farewell to Ganga, Nakulan, and Sunny. Before leaving, Sunny proposes to Sreedevi, who accepts.