I don’t remember the title or author. This was a story that was originally written as a fanfic set in Lois McMaster Bujold’s Vorkosigan universe. It was posted at a fanfic website. But it was good enough that the author was able to change the Vorkosigan-specific details and sell the story for publication. I believe it was published in one of the monthly SF digest magazines like Asimov’s or Analog.
I’ll bet you’re thinking of “Negri’s Boys,” by Charles Finlay, which was retooled as “The Political Officer,” and published in The Magazine Of Fantasy And Science Fiction. It was nominated for the Hugo and Nebula Awards.