"Run For The Stars" by Harlan Ellison (1957).
This assumes that we're not talking about children's books (in which case "Angry Planet" has priority) or debatably SF ("1984")
"Run For The Stars" has an antihero drug addict/petty criminal (Benno Tallant) on a planet being attacked by an alien species, the Kyben. The Kyben have won, and the remnant defenders are about to retreat to Earth. To buy time, they surgically connect a superbomb to Benno (and no, the process is not voluntary), wired to go off if the Kyben fleet tries to leave or if the carrier is killed. They inform the Kyben, then tell Benno to stay alive as long as he can, and leave him to his fate. Benno takes the offensive, sneaks and murders his way onto the Kyben flagship and kills the commander, losing one arm in the process. He forces a Kyben doctor to become an addict, then has the doctor remove the bomb and graft it to his stump, with the trigger now being voluntary.
As the novel ends, he addresses the Kyben fleet, announcing that he is the new commander. The new target for the fleet: Earth.