Stiles was a lieutenant and navigator aboard the USS Enterprise in 2266. He was on bridge duty when the Enterprise responded to the destruction of several Earth outposts on the Federation side of the Romulan Neutral Zone.
Stiles evidently came from a family with a long history of space service; he mentioned a captain, two commanders and several junior officers who all served during the Earth-Romulan War – and who were all lost in that war. These family losses left him with an inherent hatred of Romulans that was perhaps greater than that of most other officers. It also made him suspicious that the outposts' attacker would be Romulan – a suspicion that turned out to be accurate.
When it was learned the Romulans were externally identical to Vulcans, Stiles transferred his hatred to Spock, making a number of thinly-veiled insinuations that eventually drew the ire of Captain James T. Kirk; Kirk remarked that bigotry had no place on the bridge.
During battle with the Romulan ship, close-range detonation of a nuclear device left the forward phaser control room manned only by Specialist Robert Tomlinson, with no standby crew. Since Stiles' first assignment had been weapons control, he left the bridge to assist Tomlinson. When the phaser coolant line developed a fault, Stiles and Tomlinson were overcome before they could escape. Fortunately, Spock was nearby and was able to rescue Stiles before the gas could kill him, an act that possibly defused Stiles' bigotry. (TOS: "Balance of Terror")
|Navigators of the starships Enterprise|
|USS Enterprise:||Arex • Bailey • Brent • Chekov • DePaul • DeSalle • DiFalco • Farrell • Hadley • Haines • Ilia • Kelso • Latimer • Leslie • Osborne • Painter • Riley • Stiles • Saavik • Tyler • Uhura|
|USS Enterprise (alternate reality):||Chekov • Darwin|
According to one source, an earlier draft of the script for "Balance of Terror" fleshed out Stiles' suspicion that Romulan spies might have been aboard the Enterprise. A line had been written for Commander Hansen indicating that the Bird-of-Prey incorporated "starship design" elements stolen from Earth by spies or traitors. 
In the Bantam TOS novelization of "Balance of Terror" printed in Star Trek 1, author James Blish refers to Stiles as second officer (even though he seems to be outranked by Montgomery Scott in the canon episodic version of the story). Blish's treatment also lists Stiles as a fatality, removing the premise that he was saved by Spock, as seen in the episode.
Several other non-canon works mention Stiles, although contradictions exist between them. The reference Star Trek Concordance and the comic book sourcebook Who's Who in Star Trek both list him as being named "Andrew Stiles". He also appears in the Pocket TOS novel Constitution. The comic "Debt of Honor" establishes that he became a security officer in his later career, with the rank of commander. The Pocket TNG novel Red Sector states he was a commander in security at retirement, but lists his name as "John Stiles". Red Sector also indicates he might still be alive by the 2350s. Starfleet: Year One has an "Aaron Stiles", his probable ancestor, as a main character.