TenSoon is a kandra, a type of sentient magical creature in Sanderson's Mistborn series, and a proud one at that. After the events in the second book of the series, he travels to his homeland, willingly, to stand trial for several offenses that he had perpetrated against his people (and to warn the kandra of a coming danger related to those incidents). There is a very strong element of honor in the kandra culture, and TenSoon would never run away from captivity. This is mentioned multiple times in The Hero of Ages before his escape. Here, from chapter 9:
He would not run, and he would not strike down one of his own. He was better than that.
And from chapter 20:
TenSoon sat in his cage.
The cage's very existence was an insult. Kandra were not like men -- even if he were not imprisoned, TenSoon would not have run or tried to escape. He had come willingly to his fate.
However, by the end of chapter 20, something has already changed. A female acquaintance of his, MeLaan, visits him in his cell. She exhorts him to fight, to rebel against the governing body of the kandra people. He responds that he would not, but then begins manipulating his captors into affording him the opportunity of escape by mentioning that his dog's body was humiliating and disgraceful to him. This ensures that when he is taken for his execution (ch 33) he has a body that is significantly faster than his captors', allowing him to outrun them and escape successfully.
So whatever change occurred, it must have happened somewhere between the beginning and the end of the 20th chapter. Something happens, or TenSoon reaches some conclusion, that changes him from the "no, I would never try to escape even if it were possible" kandra that he was, to a "less orthodox" (his words) and rebellious kandra who takes steps to create and utilize a way out of his lawful (if somewhat unjust) execution. However, I think I missed it, whatever it was.
What caused this sudden and striking change in TenSoon's character?
I understand that this change serves to emphasize the kandras' utter surprise when TenSoon begins his escape (as well as some mild surprise for the readership), but a change this dramatic should be caused by something. TenSoon has lived approximately 700 years, and humans 1/20th of his age don't change like that without strong cause.