This fantasy superhero thriller opens with a daredevil escape magician Ramesh Kumar (Ramesh Deo) receiving word that his close friend Inspector Hanuman Prasad (Pran) has just lost his wife during childbirth. As Ramesh's wife is unable to bear children, the inspector entrusts one of his twin children to Ramesh, to rear as his own, so they may both enjoy the children. They decide to keep this a secret between them (and the doctor).
Ramesh returns to Mumbai and the boy, Shyam, learns the tricks of the trade to become Shyam jadugar (Shyam the magician, played by Amitabh Bachchan). Ramesh meets an untimely death during a failed Chinese Water Torture Cell escape trick, and his wife steadfastly dissuades Shyam from pursuing magic. However, Shyam resolves to perform the escape successfully as a tribute to his late father.
The film moves to the village of Udhampur, where a corrupt ACP Sharma (Kamal Kapoor) conspires with a notorious daku (bandit) Shaitan Singh (Goga Kapoor) to waylay a train transporting a large cache of Government gold bullion. Inspector Hanuman Prasad is falsely implicated in the robbery. He learns of the conspiracy, writes out his theory (naming Shaitan Singh and Sharma) on a small slate, and sets off to stop the ferocious daku.
After a vicious fight aboard the train, Shaitan Singh throws him to his death. (Shaitan Singh lops off his own arm, handcuffed to the inspector, to detach the inspector and crush him under the wheels of the train.) Shaitan Singh escapes, stashes the gold cache somewhere, and double crosses the ACP. But the plot backfires, and Shaitan Singh lands in jail for an extended term.
Inspector Hanuman Prasad's ten year old son seeks refuge in a Hanuman temple, and prays fervently to be able to find the conspirators behind the death of his father. (Rain had accidentally erased the two names from the small slate; thus while the boy is convinced his father was innocent, he still does not know the real culprits.)
In answer to his devoted prayer, he is granted supernatural powers (increased strength and the ability to summon storms at will) and a weapon (long range crossbow). The boy grows up, armed and empowered, to become Toofan (the storm, also played by Amitabh Bachchan). Costumed in saffron-red and black (colors typically attributed to his deity, Lord Hanuman), Toofan becomes a local savior for Udhampur. He fights off marauding dakus and local thugs, officiates at local functions, and serves as the marshal at large for the town. However, Toofan's principal aims are to assert his father's innocence and avenge his father's death.
Meanwhile, in Mumbai, a rich and cunning seth (Raza Murad) falsely cites dire circumstances and tricks Shyam into cracking a safe. Shyam is arrested. When he is released on bail, he returns to frame the seth and gets the seth caught red handed at another con job. But this con job involves some dangerous international criminals; Shyam's cover is blown and he is forced to flee; the gangsters chase Shyam to kill him.
In the resulting fracas, Shyam's close friend Gopal (Farooque Sheikh), in a bid to save Shyam, is hit by a truck and loses his arms. A dejected Gopal returns to his hometown, Udhampur.
The film takes another turn when Shaitan Singh escapes from prison. After repeated encounters with various local dakus, Toofan learns that Shaitan Singh was connected with his father's death. Toofan seeks out Shaitan Singh. After a vicious fight near a waterfall, Shaitan Singh pulls a cheap trick and Toofan falls into the river several hundred feet below. Some cops find him at a riverbank, identify him as Shyam Jadugar and bring him to Mumbai.
Thereafter, knowing Toofan is out, Shaitan Singh and his fellow dakus resume their raids on Udhampur. In one such raid, they loot Gopal's house and kill him. Around this time, in Mumbai, the doctor reveals the secret of the twins. Shyam arrives in Udhampur to visit Gopal. Finding Gopal dead, and resolving to find his killers, Shyam decides to invoke his doppelganger Toofan and challenge Shaitan Singh once again.
Toofan awakens at a hospital in Mumbai, and is immediately returned to Shyam's mother, who believes he is Shyam. Shyam is still wanted by the cops for his involvements with the seth. Toofan, posing as Shyam, plays a trick to expose the seth and exonerate Shyam. Having performed this duty, he decides to return to Udhampur and settle affairs with his old nemesis.
ACP Sharma retires from the force, and decides to go after Shaitan Singh (really the gold). Shaitan Singh kidnaps Gopal's son to lure Toofan; when Shyam shows up, posing as Toofan, Shaitan Singh overpowers him easily, shackles him up, locks him up in a railway car, and orders the train towards the cache. ACP Sharma tries to waylay the tracks (with dynamite), but is intercepted by Toofan and forced to fill out the two missing names on the slate. Shaitan Singh's train passes by; Shaitan Singh shoots Sharma; and Toofan gets on board.
Shaitan Singh gets off the train (with his gold) and shoots the driver; the train continues over an unfinished bridge, and lands in the river thereby placing Shyam into a Chinese Water Torture Cell again. Shaitan Singh takes his gold into a waiting airplane. Toofan follows the airplane and engages Shaitan Singh in combat. This time, Toofan replays Shaitan Singh's old trick back upon him and the daku falls to his death. Meanwhile, Shyam is able to perform the escape successfully, thus achieving his redemption.
The film ends with the brothers being reunited.