Thirteen-year-old Meg Murry's classmates and teachers see her as a troublesome and stubborn student. Her family knows that she is emotionally immature but also see her capable of doing great things. The family includes her beautiful scientist mother; her absent scientist father; her athletic 10-year-old twin brothers, Sandy and Dennys; and her five-year-old brother Charles Wallace Murry, a child prodigy genius who can sometimes read Meg's mind.
The book begins with the line "It was a dark and stormy night," an allusion to the opening words in Edward George Bulwer-Lytton's 1830 novel Paul Clifford. Unable to sleep during a thunderstorm, Meg descends from her attic room to find Charles Wallace sitting at the table drinking milk and eating bread and jam. They are then joined by their mother, and are visited by their new eccentric neighbor, Mrs Whatsit. In the course of conversation, Mrs Whatsit casually mentions there is such a thing as a tesseract, which causes Mrs. Murry to almost faint.
The next morning, Meg discovers the term refers to a scientific concept her father was working on before his mysterious disappearance. The following afternoon, Meg and Charles Wallace encounter Meg's schoolmate, Calvin O'Keefe, a high-school junior who, although he is a "big man on campus", considers himself a misfit as well. They then go to visit an old haunted house near town which Charles Wallace already knows is the home of Mrs Whatsit. There they encounter a companion of Mrs Whatsit, the equally strange Mrs Who. She promises that she and her friends will help Meg find and rescue her father. A budding love interest develops between Meg and Calvin. In the evening, Charles Wallace declares it is time for them to go on their mission to save their father. This is accompanied by the appearance of the third member of the "Mrs W's", Mrs Which, who appears to materialize out of nothing.
Mrs Whatsit, Mrs Who, and Mrs Which turn out to be supernatural beings who transport Meg, Charles Wallace, and Calvin O'Keefe through the universe by means of tesseract, a fifth-dimensional phenomenon explained as being similar to folding the fabric of space and time. Their first stop is the planet Uriel, a Utopian world filled with Centaur-like beings who live in a state of light and love. Mrs Whatsit herself shows that she, Mrs Who, and Mrs Which are all these centaur-like creatures in disguise as humans. There the "Mrs W's" reveal to the children that the universe is under attack from an evil being who appears as a large dark cloud called The Black Thing, which is essentially the personification of evil. The children are then taken elsewhere to visit a woman who is a medium (the "Happy Medium") with a crystal ball. In it, they see that Earth is partially covered by the darkness, although great religious figures, philosophers, and artists have been fighting against it. Mrs Whatsit is revealed to be a former star who exploded in an act of self-sacrifice to fight the darkness.
The children then travel to the dark planet of Camazotz which is entirely dominated by the Black Thing. Meg's father is trapped there. They find that all the inhabitants behave in a mechanistic way and seem to be all under the control of a single mind. At the planet's central headquarters (described as CENTRAL Central Intelligence) they discover a red-eyed man with telepathic abilities who can cast a hypnotic spell over their minds. He claims to know the whereabouts of their father. Charles Wallace deliberately looks into the red eyes of the man allowing himself to be taken over by the mind controlling planet in order to find their father. Under its influence, he takes Meg and Calvin to the place where Dr. Murry is being held prisoner because he would not succumb to the group mind. The planet turns out to be controlled by an evil disembodied brain with powerful telepathic abilities, which the inhabitants of Camazotz call "IT". Charles Wallace takes them to the place where IT is held, and in such close proximity to IT, are threatened by a possible telepathic takeover of their minds. With special powers from Mrs Who's glasses, Dr. Murry is able to "tesser" Calvin, Meg and himself away from Camazotz, but Charles Wallace is left behind, still under the influence of IT. The experience of tessering through The Black Thing nearly kills Meg, because Mr. Murry does not know how to protect her from the Black Thing which surrounds the planet. When they arrive on the neighboring planet of Ixchel, Meg is nearly frozen and paralyzed. Calvin and the Murrys are discovered by the planet's inhabitants: large, sightless "beasts" with tentacles and four arms who prove both wise and gentle. Meg's paralysis is cured under the care of one inhabitant, whom Meg nicknames "Aunt Beast". Meg also overcomes her anger at her father for leaving Charles Wallace on Camazotz, while realizing that parents can't fix everything and sometimes children can solve problems themselves.
When the trio of Mrs Whatsit, Mrs Who, and Mrs Which arrive, they charge Meg with rescuing Charles Wallace from IT, because only Meg has a strong enough bond with him, as their father had last seen Charles Wallace when he was a baby and Calvin had only just met him. They each give her gifts. Mrs Whatsit gives Meg her love. Mrs Who quotes to Meg a passage from the Bible about God choosing the foolish of the world to confound the wise, and the weak to confound the strong. Mrs Which tells Meg that she has one thing that IT does not have. Upon arriving at the building where IT is housed, Charles Wallace is still there under IT's influence. Meg realizes that the one thing she has that IT does not is love. She focuses all her love at Charles Wallace and is able to free him from IT's control. Mrs. Who, Mrs. Which and Mrs. Whatsit tesser the Murrys and Calvin back to Earth, in the vegetable garden, where they are reunited with Mrs. Murry and the twins. Mrs. Whatsit says that, although she and the others like the spectacle of the family reuniting, they have to go somewhere. However, before Mrs. Whatsit finishes her sentence she and the others disappear.