Alex Rogan (Lance Guest), is a teenager living in a southern California trailer park with his divorced mother (Barbara Bosson) and little 10-year-old brother Louis (Chris Hebert). Outside of being a handyman at the trailer park, his sole hobby is playing Starfighter, a stand-up arcade game where the player defends "the Frontier" from "Xur and the Ko-Dan Armada" in a space battle.
Alex recently dropped out of school to help out his mother and brother get by. Eventually one evening, he becomes the highest scoring player of the game. Shortly afterwards later that night, he is approached by the game's inventor, an eccentric old man who identifies himself as Centauri (Robert Preston) who invites him to take a ride.
Alex does so before discovering that the vehicle is actually a spaceship; moreover, Centauri is a disguised alien who whisks him off to a far away planet called Rylos, leaving his family and girlfriend, Maggie Gordon (Catherine Mary Stewart). So that his absence goes unnoticed, an android lookalike named Beta (Lance Guest in a dual role) is left in his place.
Upon his arrival, Alex discovers that the images and territories in the Starfighter arcade game represent an actual conflict between the Rylan Star League and the Ko-Dan Empire, an alien lizard-like race which is led by Xur (Norman Snow), a traitor to whom the Ko-Dan Emperor has promised control of Rylos itself.
The game was designed by Centauri as a test to find those "with the gift"; Alex is expected to pilot an actual Starfighter spacecraft called the Gunstar. He also discovers that The Frontier is an array of planetary-scale force fields that protect Rylos and its surrounding planets from invasion from the hostile Ko-Dan homeworlds on the other side, and that Xur has given the Ko-Dan Army the technology means to breach it.
Before Alex can fully understand and dispute his induction, Xur appears (via a holographic projection) inside of the Starfighter base and reveals he has discovered an infiltrator in his ranks and proceeds to broadcast his death by torture to the entire base, including his estranged father, Ambassador Enduran (Kay E. Kuter), the Starfighter commander.
He then proclaims to the people of Rylos that once Galan (Rylos's moon) is in full eclipse, the Ko-Dan Armada will begin their invasion and not even the Starfighters will be able to save them. When Alex asks to be taken back home, Centauri does so.
After dropping him off a short distance away from the trailer park, Centauri gives Alex a communications device, which is a means by which to contact him, should Alex change his mind. After they leave Rylos, the starfighter base is attacked. A small breach in the Frontier is achieved and the Ko-Dan command ship fires four missile-like meteors at the Starfighter base.
During the attack, a saboteur eliminates the base's defenses, causing the base to sustain heavy damage, killing all starfighters save for a friendly reptilian alien navigator named Grig (Dan O'Herlihy), and destroying all Gunstars, save for an advanced prototype.
Afterwords, Xur becomes enraged when he learns that one Starfighter pilot has escaped. Once home on Earth, Alex discovers the android who assumed his identity and contacts Centauri to come and retrieve it. Just then, a beast-like assassin appears and tries to kill Alex with a laser gun. Centuari arrives and manages to shoot the creature, but gets wounded by laser fire.
Centurari identifies the assassin as a Zando-Zan, an interstellar hitbeast, on the payroll of Xur. Alex finally realizes that the only way to protect his family (and the Earth) is to pilot a starfighter. Returning to the ruined base, Centuari apparently dies from his wound, and Alex meets up once again with Grig and they set out in the Gunstar to battle the Ko-Dan Armada by themselves.
Meanwhile back on Earth, the Beta-Alex tries to adjust to life at the trailer park and dealing with human interaction, especially with Maggie.
During an evening out at a lake with some of Alex's friends, another Zando-Zan assassin arrives in the form of a policeman that it recently killed, and tries to shoot Alex as he sits around a campfire at a resort lake. When Maggie becomes annoyed by Beta's awkward attempts at conversion, he finally gives up and admits that he is not Alex, but an android Beta unit.
The assassin overhears this and fires his laser gun at Beta, revealing green android fluid which comes out of the wound. The assassin flees in the stolen police car while Beta, with Maggie tagging along, chases the assassin in a pickup truck Beta steals.
When the assassin arrives back at his small spaceship, he attempts to radio the Ko-Dan Armada to report that the last starfighter is actually about to attack. Beta forces Maggie to jump from the truck as he rams the truck into the assassin's spaceship, destroying it and him, but stopping the transmission to the Ko-Dan Armanda.
With the Frontier down, Xur orders the Armada to attack. Alex and Grig hide in a small astroid near the Frontier and attack the Ko-Dan mother-ship from behind, crippling its communications system; catching the Ko-Dan fighter wings off-guard.
The climatic space battle reaches a fevered pitch; Alex keeps the upper hand, using the "lone fighter-against-hordes" tactics he mastered by playing the coin-operated video game. Soon, however, his weapons are depleted.
Desperately, he activates a secret weapon installed in the Gunstar: "Death Blossom", which destroys all the remaining Ko-Dan fighters. Lord Kril (Dan Mason), the commander of the Ko-Dan mothership, blames Xur for this turn of events. After relieving Xur of command, Kril orders him executed. Instead, Xur takes advantage of Alex's attack and kills the sentries escorting him from the bridge.
He then flees from the command ship in an escape pod. Kril then orders the command ship to ram the lone Gunstar which has been drained of power by the use of the Death Blossom weapon.
Grig manages to tap into the Gunstar's life support systems to temporarily regain power, which Alex fires and disables the command ship's systems, forcing it to crash into the moon of Rylos. The command ship is destroyed, killing Kril and all of the remaining Ko-Dan warriors on board.
Alex is proclaimed the savior of Rylos, only to discover from Enduran (who escaped from the Starfighter base before its destruction) that the Star League is still vulnerable: the Frontier has collapsed and Xur escaped, and he will continue to be a threat as long as he still lives.
Alex agrees to stay on Rylos for good and recruit other Starfighters, rebuilding the Legion. Alex is also happy and revealed to see that Centuari is alive having healed himself from his wounds.
However, Alex returns to Earth, dramatically landing his Gunstar in the trailer park. Grig tells Alex's mother and the people of the trailer park of Alex's heroism in the Rylan War and that he will be a Starfighter of great potential, who will teach future Starfighters. After explaining to his friends and family where he was, Alex reveals that his services as a Starfighter are still needed by the Rylan Star League and that he may not return for a while.
He then asks Maggie to join him in space. Maggie's grandmother, Granny Gordon (Meg Wyllie) gives her blessing to her granddaughter, and Maggie returns to Rylos with him. After Alex's Gunstar takes off back to Rylos, Alex's little brother, Louis, is inspired to follow in his brother's footsteps and begins playing the game, so that he too can master it.