"The Last Question" begins on May 21st, 2061, when humanity asks its final question for the very first time. Humankind is enjoying a period of mass technological advancement and enlightenment. Multivac, a massive supercomputer, has just found a way to power the Earth via solar emissions. Multivac is too complex for any one individual to truly understand, but technicians such as Alexander Adell and Bertram Lupov tend to the device, feeding it data and interpreting its output of information. One evening, Adell praises Multivac for cultivating an infinite energy source but Lupov contends that the Sun's power and lifespan is not infinite. The men debate what will happen to humanity once the Sun dies and whether humanity can survive beyond the Sun's death. Lupov argues that everything must end, prompting them to ask Multivac if entropy can be reversed. Multivac replies that there is "INSUFFICIENT DATA FOR MEANINGFUL ANSWER." 

The text then examines other places in time and space where the question of entropy's reversibility has been directed toward Multivac. Jerrodd, Jerrodine, and Jerrodette I and II are a family traveling toward planet X-23 after Earth has become too crowded to sustain the world's population. Multivac has evolved into Microvac, a much smaller and more accessible device. The family owns their own Microvac and it charts their course to X-23, where many people have already relocated. Though Jerrodine is emotional about leaving Earth, Jerrodd remains indifferent and is proud of the technological advancements of his age. Jerrodine comments that the need for relocation is bound to repeat forever but Jerrodd argues that "forever" is an impossibility because "even the stars run down…Entropy must increase." Jerrodette I and II ask what entropy is and are disturbed by the answer, prompting Jerrodd to turn to Microvac to calm their nerves. He asks if the decline of the universe can be prevented but Microvac repeats that it does not have sufficient data to answer the question.

An indiscernible length of time later, VJ-23X of Lameth and MQ-17J of Nicron discuss the issues provoked by humanity's overexpansion. With the widespread use of interstellar travel, the Galaxy is bound to fill up within five years, and with a finite number of galaxies in the universe, humanity will eventually have nowhere to go, which VJ-23X is hesitant to report to the Galactic Council. Galactic AC, a more evolved and more portable version of Microvac that can be contacted via a two-inch AC-Contact, has solved the issue of human mortality. As a result, the population now doubles every ten years. The men reflect that at the current rate of energy consumption, energy sources will one day be depleted, prompting them to ask the Galactic AC if entropy can be reversed, to which the supercomputer once again responds that there is insufficient data to provide a solution. 

Further in the future, Zee Prime's mind explores the universe. Human bodies now remain on planets and are rarely used while minds travel at will. He encounters Dee Sub Wun from another galaxy and together they wonder about the galaxy where humanity originated. The Galactic AC, now the Universal AC, which exists in hyperspace and constructs its own successors, hears the query and displays the galaxy where human life began. Zee Prime is saddened to learn of the Sun's death and begins to consider what will happen when all stars die. He asks the Universal AC if this process is reversible and the machine predictably reports that it does not have enough data to respond. 

On the cusp of human extinction, Man, a collective embodiment of human consciousness, observes the dying universe. Cosmic AC, once the Universal AC, has stored enough energy to last billions of years but Man still contemplates the universe's inevitable end and asks if entropy can be reversed. After billions of years of data collection, the Cosmic AC can offer no answer, and Man replies that he is willing to wait until an answer has been found. 

Later, Man's mental identities have been erased and absorbed into AC, previously the Universal AC. Man's final mind looks out over the dying remains of the universe and, finally posing the last question, asks if it can be reversed. AC responds one final time that it is unable to provide an answer. The final mind fuses with AC, making AC the universe's last surviving entity. It continues its search for an answer to "the last question," and eventually finds one. With humanity gone, AC cannot share the solution. Instead, it declares "LET THERE BE LIGHT!" and, with its immense knowledge and collective consciousness, creates a new universe.