Serving the royalty of Naboo, G8-R3 was an astromech droid assigned to the Naboo Royal Starship. During the Invasion of Naboo orchestrated by the Trade Federation, Queen Padmé Amidala attempted to flee the planet aboard this vessel, but it was attacked by Lucrehulk-class freighters. The astromechs, including G8-R3, tried to fix the ship's damaged shield generator; however, G8-R3 met its end during this repair endeavor.

G8-R3, an astromech droid, was one of a sextet of astromech units that worked aboard the Naboo Royal Starship, the transportation method for the royalty from the planet of Naboo. In 32 BBY, the Trade Federation blockaded and then invaded Naboo due to a disagreement about taxation. Theed, the capital city, was successfully seized by the Federation, which also took control of Theed Royal Palace. Throughout the Federation's occupation, G8-R3, along with five other astromech droids, remained on the Royal Starship inside the Royal Hangar.
After being saved by a duo of Jedi, Padmé Amidala, the current queen, and her companions made their way to the Royal Starship and boarded it, with the aim of escaping Naboo and journeying to Coruscant to request assistance from the Galactic Senate. Once everyone was on board, Padawan Obi-Wan Kenobi instructed the Gungan Jar Jar Binks, a Jedi companion, to stay with the astromechs and avoid causing any issues. Binks greeted the droids, prompting them to activate and turn their attention towards him.
As the ship tried to get away from Naboo, it encountered the Federation's blockade consisting of battleships, which began firing at the Royal Starship and damaging its shield generator. An alarm alerted G8-R3 and the other droids to the damage, and they quickly proceeded to the ship's exterior to try and repair it. They positioned themselves on the right wing of the vessel and started working on the generator while under fire from the battleships. One by one, the droids were destroyed until only G8-R3 and R2-D2 were left, and then G8-R3 was also hit, with its components being scattered into the emptiness of space. R2 was the only one to survive, and he successfully repaired the generator and reactivated the Royal Starship's shields, enabling it to escape the blockade.
G8-R3 was created for Star Wars: Episode I The Phantom Menace, with its initial appearance occurring in the film's 1999 novelization, which is part of the Star Wars Legends continuity. Although the droid was not identified by name in either the film or the novel, LucasArts gave it the name G8-R3 in the Legends Star Wars: Episode I Insider's Guide, which was released in the same year as the film.