This historical tale The begins in 1857, when India was ruled by the British East India Company. Mangal Pandey (Aamir Khan) is a sepoy, a soldier of Indian origin, in the army of the East India Company. Pandey is fighting in the Anglo-Afghan Wars and saves the life of his British commanding officer, William Gordon (portrayed by Toby Stephens). Gordon is indebted to Pandey and a strong friendship develops between them, transcending both rank and race.
Gordon rescues a young widow, Jwala (Ameesha Patel), from committing Sati (the act of following her deceased husband on to the funeral pyre). Afterwards, he falls in love with her. Meanwhile, Heera (Rani Mukerji) has been sold into finance, to work for Lol Bibi (Kirron Kher). There is a spark of attraction between her and Pandey and a liaison follows.
Gordon and Pandey's friendship is challenged following the introduction of a new rifle, the Enfield rifled musket. In reality as in the film, rumours began to spread among the sepoys that the paper cartridges that held the powder and ball for the rifle were greased with either pig fat or beef tallow. Since the process of loading the cartridge required the soldier to bite the cartridge open to pour in the loose powder, the soldiers believed that the process would require them to consume pork or beef – an act abhorrent to Muslim and Hindu soldiers, respectively, for religious reasons.
In the film, Gordon investigates, and is told to assure Pandey that the cartridges are free from pollution. Demonstrating his total trust in Gordon, Mangal bites the cartridge. But Pandey soon discovers that the cartridges really are greased by animal fat. The rumour of this imposed pollution is the spark that ignites the powder keg of resentment in the country. Mutiny breaks out, led by Pandey. At one point Pandey and Gordon become involved in direct hand-to-hand combat as the latter tries to dissuade the sepoy from what he believes to be a futile exercise that will lead to only death.
However, the Company was prepared and brought in British army units from Rangoon and Pandey was captured and executed, despite the protestations of Gordon, who reasons that Pandey will be revered as a martyr and that his legacy will cause more uprising. This turns out to be correct; Mangal marries Heera in his jail cell before his execution as the film closes to scenes of nationwide revolt against British rule. Gordon is listed as having joined the rebellion against the Company Raj.
The film ends with a montage of drawings of the historical rebellion and the narrator describes the progress of the Indian independence movement over the next century. The montage ends with documentary footage of Mohandas Karamchand Gandhi leading the Indian National Congress during peaceful protests against British rule in the 1940s, eventually forcing an end to colonialism in the subcontinent.