Men in Black (M.I.B.) is a secret non-government agency that polices extraterrestrial alien refugees. The agency operates from an underground base at a Triborough Bridge and Tunnel Authority ventilation station in Battery Park. MIB members use neuralyzers to erase witness's memories of alien sightings. MIB is monitoring about 1500 aliens around the world, most of them in the vicinity of New York City.
One night, Agent K (Tommy Lee Jones) and his partner, D (Richard Hamilton) intercept a truck containing illegal immigrants and an extraterrestrial disguised as a human. When a U.S. Border Patrol agent sees the alien without its disguise, the alien attacks him, forcing K to destroy it and neuralize the agent and his colleagues. D, feeling too old, asks K to neuralize him into "retirement". Later, the MIB leader, Agent Zed (Rip Torn), suggests that K should search for a new partner.
Meanwhile, James Darrell Edwards III (Will Smith) is a New York police officer pursuing a man on foot. While chasing the incredibly fast and agile fugitive over the rooftops, Edwards sees the man blink with a set of secondary eyelids, and learns he must be an alien. K arrives at the precinct station, questions Edwards about the incident, then takes him to a pawnshop run by Jack Jeebs (Tony Shalhoub) to identify the strange weapon the criminal drew on him. While questioning Jeebs, K reveals Jeebs is an alien by blowing his head off with a weapon, which grows back immediately. After Edwards finds a weapon identical to the one he saw among Jeebs' hidden stash of alien technology, K neuralizes him and leaves the cop an MIB business card. Later, Edwards goes to the MIB's secret headquarters and competes with several others to qualify to join the agency. After the tests, K takes him aside (while the others are neuralyzed) and offers him the position. Edwards accepts and his identity is erased, becoming Agent J.
Suspicious of why extraterrestrials are suddenly leaving the planet, the M.I.B. investigate a farmer named Edgar (Vincent D'Onofrio), who has been acting strangely after an alien craft crashed on his farm. Edgar has been killed and his skin used as a disguise by a "Bug", a member of a giant cockroach-like species that are at war with several other alien races, including the Arquillians. An Arquillian prince hiding in Brooklyn who is disguised as a human jewelry store owner is attacked, and tells J as he dies that "the galaxy is on Orion's belt".
M.I.B. informant Frank the Pug (Tim Blaney), a Remoonian disguised as a small lapdog, explains that the missing galaxy is a massive source of energy housed in a small jewel. The Bug figures out the galaxy is hanging on the collar of Rosenberg's cat Orion, which refuses to leave the prince's body at the morgue. Orion has been taken care of by Dr. Laurel Weaver (Linda Fiorentino). J arrives at the morgue just as the Bug kidnaps Weaver and grabs the galaxy. The Arquillians deliver an ultimatum to M.I.B. to secure the galaxy within an hour, or they will destroy Earth.
The Bug arrives at the site of two disguised flying saucers, the observation towers of the New York State Pavilion at Flushing Meadows. K and J are close behind and destroy one saucer. The Bug sheds Edgar's skin and swallows J's and K's guns. K tells J to stop the Bug from getting onto the other ship, then taunts the Bug until K too is swallowed. J infuriates the Bug by crushing cockroaches and taunting him.
The Bug is blown open from the inside by K, who located his gun in the Bug's stomach. As J and K sit on the ground covered in slime, the mortally wounded insect tries to attack again, but is killed by Weaver using J's discarded weapon. The three return to M.I.B. headquarters and K tells J that he has not been training him as a partner, but as a replacement. J neuralyzes K, using a coma cover story to allow him to return to his civilian life and the young woman he left behind. A few days later, it is revealed that Weaver also joined M.I.B. and is now J's new partner, Agent L.
As a coda, the camera rapidly pulls back, showing that Earth and the Milky Way galaxy are also inside an alien marble being used in a cosmic game.
- Tommy Lee Jones as Agent K / Kevin Brown: J's grizzled and humorless mentor. Clint Eastwood turned down the part, while Jones only accepted the role after Steven Spielberg promised the script would improve, based on his respect for Spielberg's track record. He had been disappointed with the first draft, which he reportedly said "stank". Jones felt it did not capture the tone of the comic, which he declared was what motivated him to get into the project.
- Will Smith as James Darrell Edwards III / Agent J: A former N.Y.P.D. member, newly recruited to the M.I.B. Smith was cast because Barry Sonnenfeld's wife was a fan of The Fresh Prince of Bel-Air. Sonnenfeld also liked his performance in Six Degrees of Separation. Chris O'Donnell turned down the role because he found the role of a new recruit too similar to Dick Grayson, whom he played in Batman Forever and Batman & Robin. David Schwimmer also turned down the part. Like Jones, Smith said he accepted the role after meeting with Spielberg, who had been suggested to invite Smith for J by his wife Kate Capshaw.
- Vincent D'Onofrio as Edgar the Bug: A giant alien insect who eats a farmer and uses his skin as a disguise. He comes to earth to kidnap the Galaxy and use it to destroy the Arquillians. John Turturro and Bruce Campbell were both offered the role. The make-up increasingly enhanced the damage on D'Onofrio's face to indicate the decomposition of Edgar's skin worn by the Bug.
- Linda Fiorentino as Dr. Laurel Weaver / Agent L: A deputy medical examiner who has had a few run-ins with the M.I.B. in the past.
- Rip Torn as Chief Z (Zed): The head of the M.I.B.
- Tony Shalhoub as Jack Jeebs: An alien, posing as a pawn shop owner, who deals in illegal weapons.
- Siobhan Fallon Hogan as Beatrice, the wife of the Edgar.
- Mike Nussbaum as Gentle Rosenberg, Arquillian Jeweler: Guardian of the Galaxy, which he has attached to his pet cat's collar.
- Jon Gries as Van Driver
- Sergio Calderón as Jose
- Carel Struycken as Arquillian
- Fredric Lehne as INS Agent Janus
- Kent Faulcon as 2nd Lt. Jake Jensen
- Richard Hamilton as Agent D: K's partner at the film's start, he decides he is too old for the job and has K erase his memory so he can retire.
- David Cross as Newton the Morgue Attendant. Sonnenfeld himself had considered taking this role, but went for Cross considering he had a better comic timing.
- Tim Blaney as Frank the Pug (voice): A smart-talking pug-like alien.
- Patrick Breen as Redgick
- Sean Whalen as Passport Officer