On July 2, a 500 km wide alien mothership enters Earth's orbit and deploys several dozen saucer-shaped "destroyer" spacecraft, each 15 miles (24 km) wide. As they take position over some of Earth's major cities, David Levinson, an MIT graduate working for a cable company in New York City, discovers hidden satellite transmissions which he believes to be a timer counting down to a coordinated attack by the aliens. With the help of his estranged wife Constance Spano, a White House employee, he and his father Julius gain entrance into the Oval Office to warn President Thomas J. Whitmore of the attack. Whitmore orders large-scale evacuations of the targeted cities, but the aliens attack with advanced directed energy weapons before these can be carried out. Whitmore, portions of his staff, and the Levinsons narrowly escape aboard Air Force One as Washington, D.C. is destroyed.
On July 3, the Black Knights, a squadron of Marine Corps F/A-18 Hornets, participate in an assault on a destroyer near the ruins of Los Angeles. Their weapons fail to penetrate the craft's force field. Dozens of "attacker" ships are launched by the aliens in defense, and a one-sided dogfight ensues in which nearly all the Hornets are destroyed. Afterwards, many American military installations, including NORAD, are destroyed. Captain Steven Hiller is the only man to survive and lures a single attacker to the Grand Canyon, forcing both their aircraft to crash in the desert. He subdues the injured alien and is rescued by Russell Casse, who is traveling across the desert with a group of refugees. They take the alien to nearby Area 51, where Whitmore and his remaining staff have also landed. Area 51 conceals a top-secret facility housing a repaired attacker and three alien bodies recovered from Roswell in 1947.
When scientist Dr Brackish Okun attempts to autopsy the alien, it regains consciousness and attempts to escape. When questioned by Whitmore, it reveals that its species travels from planet to planet, destroying all life and harvesting the natural resources. The alien attempts a psychic attack against Whitmore, but is killed by his security detail. Whitmore orders a nuclear attack on the destroyers, but the first attempt fails to penetrate the force field of the destroyer and the remaining strikes are aborted.
On July 4, Levinson devises a plan to use the repaired attacker to introduce a computer virus and plant a nuclear missile on board the mothership, theorizing that this will disrupt the force fields of the destroyers. Hiller volunteers to pilot the attacker, with Levinson accompanying him. With not enough military pilots to man all available aircraft, volunteers including Whitmore and Casse are enlisted for the counterstrike.
With the successful implantation of the virus, Whitmore leads the attack against an alien destroyer approaching Area 51. Although the force field is deactivated and the fighters are able to inflict damage, their supply of missiles is quickly exhausted. As the destroyer prepares to fire on the base, Casse has one last missile to spare but his attempt at firing it jams, leaving him no choice but to sacrifice his own life. He flies his aircraft into the alien weapon with a kamikaze attack, destroying the craft. Human resistance forces around the world successfully destroy the other craft, while the nuclear device destroys the alien mothership as Hiller and Levinson escape. They return unharmed and reunite with their families. The whole world then celebrates its heroes' victory as well as its true "Independence Day".