While NASA launches The BEACON, a deep space communication project, Alex Hopper is a talented but undisciplined slacker. His brother Stone, a naval Commander, forces Hopper to join the Navy. Hopper becomes a lieutenant on the USS John Paul Jones DDG-53, sister-ship to his brother's command, the USS Sampson DDG-102. Hopper also falls in love with Admiral Shane's daughter, Samantha, and wants to marry her, but is afraid of asking her father's permission, as he doesn't like Hopper. During the RIMPAC opening ceremony, Hopper gets into a brawl with Captain Nagata of the Japanese Maritime Self Defense Force, in charge of JDS Myoko DDG-175. Hopper soon learns that he is to be kicked out of the Navy at the end of RIMPAC. Meanwhile, Samantha accompanies Army veteran and amputee Mick Canales on a hike on Oahu in order to help him adapt to his prosthetic legs.
A small fleet of alien ships arrives in response to the NASA signal. One ship collides with an orbital satellite and crashes in Hong Kong, while four others land in the waters near Hawaii. The aliens erect a massive forcefield around the islands, trapping a number of American and Japanese's warships, including Hopper's ship. The aliens attack, destroying Nagata and Stone's ships. Hopper's superiors are killed, leaving him in command of the John Paul Jones. Captain Nagata and some of his crew members are rescued from the waters and assists the Americans in setting up a discreet way to track the aliens using wave-detection buoys (reproducing the famous game grid). During a night-time battle, the aliens and the Americans exchange pot shots, but Hopper manages to sink two alien ships. They rescue an alien from the water. They discover the aliens are very sensitive to sun light and have to wear filters during the day. Using this knowledge, Hopper attacks another alien ship at dawn, using a sniper rifle with Nagata to breach their cockpit window and blind them with sunlight. The USS John Paul Jones managed to sink the other ship, but is also destroyed in the battle.
A group of alien footsoldiers and scientists lands on Oahu and attack the NASA communications array. Samantha and Mick narrowly avoid their detection, and run into a fleeing NASA scientist. Because the aliens' communications ship crashed in Hong Kong, the aliens plan to use the NASA array to signal their home planet to invade Earth. Realizing that a larger invasion might be imminent, Samantha manages to get a radio and warns Hopper of the threat.
Having no better options, the surviving crew of the John Paul Jones return to harbor and board the USS Missouri BB-63, a 70-year old decommissioned battleship that has been converted into a museum. With the aid of the museum staff, all elderly war veterans, Hopper manages to put the Missouri out to sea again. With some clever maneuvers, the Missouri destroys the last alien ship and shells the communications array, destroying the aliens and ending the threat of invasion.
Back on shore, the crew and Mick all get medals, including a posthumous one to Stone, after the ceremony, Adm. Shane leads Hopper off to discuss his 'Terms of Surrender' over a meal.