Midnight's Children is a loose allegory for events in India both before and, primarily, after the independence and partition of India. The protagonist and narrator of the story is Saleem Sinai, born at the exact moment when India became an independent country. He was born with telepathic powers, as well as an enormous and constantly dripping nose with an extremely sensitive sense of smell. The novel is divided into three books.

The book begins with the story of the Sinai family, particularly with events leading up to India's Independence and Partition. Saleem is born precisely at midnight, August 15, 1947, therefore, exactly as old as the independent republic of India. He later discovers that all children born in India between 12 a.m. and 1 a.m. on that date are imbued with special powers. Saleem, using his telepathic powers, assembles a Midnight Children's Conference, reflective of the issues India faced in its early statehood concerning the cultural, linguistic, religious, and political differences faced by a vastly diverse nation. Saleem acts as a telepathic conduit, bringing hundreds of geographically disparate children into contact while also attempting to discover the meaning of their gifts. In particular, those children born closest to the stroke of midnight wield more powerful gifts than the others. Shiva "of the Knees", Saleem's nemesis, and Parvati, called "Parvati-the-witch," are two of these children with notable gifts and roles in Saleem's story.

Meanwhile, Saleem's family begin a number of migrations and endure the numerous wars which plague the subcontinent. During this period he also suffers amnesia until he enters a quasi-mythological exile in the jungle of Sundarban, where he is re-endowed with his memory. In doing so, he reconnects with his childhood friends. Saleem later becomes involved with the Indira Gandhi-proclaimed Emergency and her son Sanjay's "cleansing" of the Jama Masjid slum. For a time Saleem is held as a political prisoner; these passages contain scathing criticisms of Indira Gandhi's overreach during the Emergency as well as a personal lust for power bordering on godhood. The Emergency signals the end of the potency of the Midnight Children, and there is little left for Saleem to do but pick up the few pieces of his life he may still find and write the chronicle that encompasses both his personal history and that of his still-young nation; a chronicle written for his son, who, like his father, is both chained and supernaturally endowed by history.

The technique of magical realism finds liberal expression throughout the novel and is crucial to constructing the parallel to the country's history.[5] The story moves in different parts of Indian Subcontinent – from Kashmir to Agra and then to Bombay (now, Mumbai), Lahore, Dhaka. Nicholas Stewart in his essay, "Magic realism in relation to the post-colonial and Midnight's Children," argues that the "narrative framework of Midnight's Children consists of a tale – comprising his life story – which Saleem Sinai recounts orally to his wife-to-be Padma. This self-referential narrative (within a single paragraph Saleem refers to himself in the first person: ″And I, wishing upon myself the curse of Nadir Khan." and the third: "'I tell you,' Saleem cried, 'it is true. ...'") recalls indigenous Indian culture, particularly the similarly orally recounted Arabian Nights. The events in Rushdie's text also parallel the magical nature of the narratives recounted in Arabian Nights (consider the attempt to electrocute Saleem at the latrine (p.353), or his journey in the 'basket of invisibility' (p.383))."[5] He also notes that, "the narrative comprises and compresses Indian cultural history. 'Once upon a time,' Saleem muses, 'there were Radha and Krishna, and Rama and Sita, and Laila and Majnun; also (because we are not unaffected by the West) Romeo and Juliet, and Spencer Tracy and Katharine Hepburn," (259). Stewart (citing Hutcheon) suggests that Midnight's Children chronologically entwines characters from both India and the West, "with post-colonial Indian history to examine both the effect of these indigenous and non-indigenous cultures on the Indian mind and in the light of Indian independence."[5]

In 1984 Prime Minister Indira Gandhi brought an action against the book in the British courts, claiming to have been defamed by a single sentence in chapter 28, penultimate paragraph, in which her son Sanjay Gandhi is said to have had a hold over his mother by his accusing her of contributing to his father's Feroze Gandhi's death through her neglect. The case was settled out of court when Salman Rushdie agreed to remove the offending sentence.[6]