A police officer joins the Men in Black (MIB), a secret agency that maintains Earth as a "neutral zone" for extraterrestrial aliens disguised as humans around New York City. A Bug, a member of a giant cockroach-like species at war, comes to Earth searching for an object called the Galaxy. MIB must secure the Galaxy to prevent the Bug from destroying Earth. Along the way, they encounter the Bug disguised as a farmer and must retrieve the Galaxy before the Bug uses its infinite power.
Five years after the events of Men in Black, Agent J (Will Smith) is now the top operative for the MIB, the self-funded New York City-based agency that secretly monitors and regulates extraterrestrials' activity on Earth. J is largely without a partner, after Agent L (from the first film) decided to return to her former life and subsequent partners have not lived up to J's professional standards. While investigating a seemingly routine crime at a SoHo pizzeria, J uncovers a diabolical plot by Serleena, a shape-shifting Kylothian queen who disguises herself as a lingerie model (Lara Flynn Boyle), but resembles a plant-like hydra in her own form. The Neuralyzed Agent K (Tommy Lee Jones) has assumed civilian life as Kevin Brown, postmaster of a small town in Massachusetts, and to stop her, J must convince Kevin to rejoin MIB, because he is the only operative still alive who knows how to find what Serleena wants, the "Light of Zartha". While J tries to Deneuralyze Kevin, Serleena breaks into MIB resulting in a lock down; J and Kevin escape after being flushed from the building. J then takes Kevin to Jack Jeebs (Tony Shalhoub), who built an unofficial Deneuralyzer. Although K eventually regains some of his memory, he still has no recollection of the "Light of Zartha" (he Neuralyzed himself) but left himself a series of clues in case he needed to remember. The clues eventually lead to a video-store where they watch a tape that jars K's memory: 25 years ago, the Zarthan Queen Laurana arrived on Earth to try to hide the Light of Zartha, but the MIB refused to help due to their neutrality. Serleena arrived to steal the Light, but K activated the Zarthan ship and sent it away. Serleena, believing the Light is on board the ship, chased the ship, but not before fatally shooting Laurana. K then reveals that the ship was a decoy, and that the Light is still hidden on Earth. Meanwhile, Serleena frees all of the MIB's high-security prisoners and uses them as henchmen. Believing that the Light is in the bracelet worn by Laura Vasquez (Rosario Dawson), a waitress at the pizzeria, Serleena kidnaps Laura and prepares to send her back to her home-world. K and J assault MIB headquarters, defeat Serleena's henchmen, and rescue Laura. However, K warns them that if the Light is not taken off Earth and returned to Zartha, it will explode and destroy the planet. As they make their way to the departure point, Serleena gives chase but is eaten by Jeff, a giant alien worm living in the New York subway system. When they reach the departure point, K reveals that Laura is Laurana's daughter and the actual Light of Zartha (it's also suggested that he is her father as well). To save Earth and Zartha, Laura reluctantly leaves Earth, much to J's dismay, as he had developed feelings for her. Serleena returns to try to capture Laura again, but K and J manage to destroy her for good. To cover up the chaos caused by Serleena's rampage, K activates a giant Neuralyzer hidden in the Statue of Liberty's torch. Now that Laura is gone, K and Agent Zed (Rip Torn the head of MIB) try to console J for his loss, but he answers that he needs no consolation and had accepted her departure without much sorrow. To provide a measure of comfort, K puts the aliens found in a Grand Central Terminal locker, as one of the clues, in J's locker.
Agent J travels back in time to 1969 to prevent an alien, Boris the Animal, from killing his partner Agent K and altering history. With the help of a prescient alien, they acquire the ArcNet, a device that can save Earth from an invasion by the Boglodytes. They confront the younger and elder versions of Boris, and ultimately succeed in stopping the invasion and restoring the timeline.