In the 29th century, rampant consumerism and environmental neglect have turned Earth into a garbage-strewn wasteland; humanity is nowhere to be found and has been evacuated by the megacorporation Buy-n-Large (BnL) on giant starliners seven centuries earlier. Of all the Waste Allocation Load-Lifter: Earth-class (WALL-E) robots left by BnL to clean up, only one remains operational. One day, WALL-E's routine of compressing trash and collecting interesting objects is broken by the arrival of an unmanned probe carrying an Extraterrestrial Vegetation Evaluator (EVE) robot, sent to scan the planet for human-sustainable life. WALL-E is smitten by the sleek, otherworldly robot, and the two begin to connect until EVE goes into standby when WALL-E shows her his most recent find: a living seedling. The probe then collects EVE and the plant, and—with WALL-E clinging on—returns to its mothership, the starliner Axiom.
In the centuries since the Axiom left Earth, its passengers have degenerated into helpless corpulence due to laziness and microgravity, their every whim catered to by machinery; even the captain, B. McCrea, is used to sitting back while his robotic steering wheel AUTO flies the ship. McCrea is unprepared to receive the positive probe response, but discovers that placing the plant in the ship's Holo-Detector will trigger a hyperjump back to Earth so humanity can begin recolonization. Upon inspecting EVE's storage compartment, however, the plant is missing, and EVE blames WALL-E for its disappearance.
EVE is deemed faulty and taken to Diagnostics. Mistaking the process for torture, WALL-E intervenes, causing him and EVE to be designated as rogues. Frustrated, EVE tries to send WALL-E home in an escape pod, but they witness AUTO's gopherbot GO-4 stowing the stolen plant in a pod set to self-destruct. WALL-E saves the plant, and he and EVE reconcile and celebrate with a dance in space around the Axiom.
EVE brings the plant back to McCrea, who watches EVE's recordings of Earth and concludes that they have to go back. However, AUTO is revealed to be loyal only to his own secret no-return directive A113—issued after BnL incorrectly concluded centuries ago that the planet could not be saved—even when McCrea countermands it; AUTO mutinies with GO-4 as a result, electrocuting and frying WALL-E's circuit board, putting EVE into standby, throwing them both down the garbage chute, and locking McCrea in his quarters.
EVE and WALL-E are nearly ejected into space along with the ship's trash but are saved by a Microbe Obliterator robot named M-O, who has been following WALL-E's dirt trail across the ship. As humans and robots help in securing the plant, McCrea and AUTO fight for control, resulting in WALL-E being crushed in the Holo-Detector when he tries to keep it open; McCrea eventually overpowers and deactivates AUTO, and the plant is inserted into the Holo-Detector, initiating the hyperjump.
Arriving back on Earth, EVE repairs WALL-E but finds that his memory has been reset and his personality is gone. Heartbroken, EVE gives WALL-E a farewell kiss, which sparks his memory and restores his original personality. WALL-E and EVE reunite as the inhabitants of the Axiom take their first steps on Earth. During the credits, humans and robots turn the ravaged planet into a paradise, and the plant is shown to have grown into a mighty tree.