In 1989, scientist Hank Pym resigns from S.H.I.E.L.D. after discovering their attempt to replicate his Ant-Man shrinking technology. Believing the technology is dangerous, Pym vows to hide it as long as he lives. In the present day, Pym's estranged daughter, Hope van Dyne, and former protégé, Darren Cross, have forced him out of his own company. Cross is close to perfecting a shrinking suit of his own, the Yellowjacket, which horrifies Pym.
Upon his release from prison, well-meaning thief Scott Lang moves in with his old cellmate, Luis. While visiting his daughter Cassie unannounced, Lang is rebuked by his former wife Maggie and her police-detective fiancé, Paxton, for not providing child support. Unable to hold a job because of his criminal record, Lang agrees to join Luis' crew and commit a burglary. Lang breaks into a house and cracks its safe, but only finds what he believes to be an old motorcycle suit, which he takes home. After trying the suit on, Lang accidentally shrinks himself to the size of an insect. Terrified by the experience, he returns the suit to the house, but is arrested on the way out. Pym, the homeowner, visits Lang in jail and smuggles the suit into his cell to help him break out.
At his home, Pym, who manipulated Lang through an unknowing Luis into stealing the suit as a test, wants Lang to become the new Ant-Man to steal the Yellowjacket from Cross. Having been spying on Cross for Pym despite her strained relationship with her father, van Dyne helps Pym train Lang to fight and to control ants. They send him to steal a device from the Avengers' headquarters, where he briefly fights Sam Wilson. While van Dyne harbors resentment towards Pym about her mother Janet's death, he reveals that Janet, known as the Wasp, disappeared into a subatomic quantum realm to disable a Soviet nuclear missile. Pym warns Lang that he could suffer a similar fate if he overrides his suit's regulator.
Cross perfects the Yellowjacket and hosts an unveiling ceremony at his headquarters. Lang, along with his crew and a swarm of flying ants, infiltrates the building during the event, sabotages the company's servers, and plants explosives. When he attempts to steal the Yellowjacket, he, along with Pym and Hope, are captured by Cross, who intends to sell both the Yellowjacket and Ant-Man suits to Hydra, led by former S.H.I.E.L.D officer Mitchell Carson. Lang breaks free and he and Hope dispatch most of the Hydra agents, though Carson is able to flee with a vial of Cross' particles. Lang pursues Cross as he escapes, while the explosives detonate, imploding the building.
Cross dons the Yellowjacket and attacks Lang before Lang is arrested by Paxton. His mind addled by the imperfect shrinking technology, Cross takes Cassie hostage to lure Lang into another fight. Lang overrides the regulator and shrinks to subatomic size to penetrate Cross' suit and sabotage it to shrink uncontrollably, killing Cross. Lang disappears into the quantum realm but manages to reverse the effects and returns to the macroscopic world. In gratitude for Lang's heroism, Paxton covers for Lang to keep him out of prison. Seeing that Lang survived and returned from the quantum realm, Pym wonders if his wife is alive as well. Later, Lang meets up with Luis, who tells him that Wilson is looking for him.
In a mid-credits scene, Pym shows van Dyne a new Wasp prototype suit and offers it to her. In a post-credits scene, Wilson and Steve Rogers have Bucky Barnes in their custody. Unable to contact Tony Stark because of "the accords", Wilson mentions that he knows someone who could help.