In 99 BCE, Sima Qian, the Han historian who wrote the Records of the Grand Historian, was arrested on a charge of deceiving the emperor. He was sentenced to castration.
Afterwards, in his Letter to Ren An, he explained why he stayed alive: “That I bear it in silence and cling to life, sunk in filth without refusing it, is because I regret that my private purpose is not fulfilled. I would be ashamed to leave the world with my writing unknown to later ages.”