Allegiance by Timothy Zahn
Young Imperial agent Mara Jade is on a mission to root out corruption in the Empire's middle levels, even as a squad of stormtroopers on the same planet deserts and sets out to uphold justice on its own terms. Before long, Mara, the rogue stormtroopers, and the heroes of the Rebellion will see their paths converge - despite the fact that Mara and Luke Skywalker won't meet face-to-face until almost eight years later! In the process, each person will have to contemplate what "allegiance" means to them.
Buy from Amazon!
Story continued in Choices of One.
This is a classic era book from the Legends timeline. It will likely be contradicted by newer books (if so, just think of it as an alternate universe).
I want to read Star Wars books about...
Ahsoka Tano Anakin Skywalker ancient galactic history Ancient Jedi Ancient Sith Asajj Ventress blood & gore Boba Fett bounty hunters Chewbacca Chiss cloning Darth Maul Darth Vader Dash Rendar Dooku everyday citizens fallen Jedi female lead characters fighter pilots Finn galactic mysteries Grand Admiral Thrawn Grand Moff Tarkin Han & Leia Han Solo heist capers Hutt Jedi Jacen Solo Jedi Jedi clones Jyn Erso Kit Fisto Kylo Ren Lando long-lost civilizations Luke Han & Leia Luke Skywalker Mace Windu Mandalorians Mara Jade minor movie characters new characters New Republic (canon) Obi-Wan Kenobi Order 66 Original Trilogy-Prequel links other Force users Padme Amidala Palpatine pirates Poe Dameron Prince Xizor Princess Leia Qui-Gon Jinn Revan Rey Rogue Squadron scum & villainy secret agents Sith Lords stormtroopers/clonetroopers superweapons the Clone Wars the criminal underworld the dark side the Death Star the Empire the First Order the Force the Hutts the Old Republic era the Rebellion the Republic the Resistance the Yuuzhan Vong Unknown Regions Wedge Antilles Wild Space wise-talking droids Wraith Squadron Yoda zombies