The Shadow of the Torturer by Gene Wolfe
Severian is a torturer, born to the guild and with an exceptionally promising career ahead of him . . . until he falls in love with one of his victims, a beautiful young noblewoman. Her excruciations are delayed for some months and, out of love, Severian helps her commit suicide and escape her fate. For a torturer, there is no more unforgivable act. In punishment he is exiled from the guild and his home city to the distant metropolis of Thrax with little more than Terminus Est, a fabled sword, to his name. Along the way he has to learn to survive in a wider world without the guild - a world in which he has already made both allies and enemies. And a strange gem is about to fall into his possession, which will only make his enemies pursue him with ever-more determination . . .