In the distant future (specifically the year 3037, in the 31st century), Earth is fighting a losing war against an alien race known as "the Glorft." In a last, desperate attempt to save the planet, the human resistance steals a prototype mecha robot from the Glorft and modifies it into a powerful war machine, renaming it MEGAS (Mechanized Earth Guard Attack System). The idea is to use a time-traveling device called a time drive to send MEGAS and its assigned pilot, Kiva Andru (Wendee Lee), two years into the past to the Battle of the Last Stand, which was the last major offensive fought by humanity against the Glorft. Humanity lost that battle, but the members of the resistance, particularly Kiva, believe that MEGAS can tip the scales and hand the Glorft a decisive defeat.
Before the plan can be executed, however, an attack by the Glorft forces the human resistance to send MEGAS back in time before proper preparations are made, but the time drive is accidentally damaged in the attack and, as a result, sends the now-crippled MEGAS (its head was blown off in the attack) all the way back to a 21st-century New Jersey junkyard, where it languishes under a pile of garbage until it ends up in the hands of a slacker mechanic, Coop (David DeLuise), and his slacker best friend, Jamie (Steve Blum), around the year 2004. Coop turns MEGAS into a hot rod project by repainting it with a flaming paint job, replacing its head with a classic muscle car (resembling a car from the '70s MOPAR family; most likely a Plymouth Barracuda) and adds XLR (eXtra Large Robot) to its name.
Kiva goes back in time to retrieve MEGAS, and when she finds she is unable to pilot it because of Coop's modifications, she grudgingly decides to train Coop, who is now the only person who can pilot it. However, the Glorft have followed her through time and, much to Kiva's chagrin, it is now up to the three of them to defend Earth from the Glorft and various other threats.