He was not actually thrown in real life but historically he still had a reputation for incompetence even being rumored to be brain damaged well before the novel. Take the records with a grain of salt though as Chinese characterizations of historical figures are usually subject to intense revisionism. After the conquest of shu he basically kept his head down, made friends with the sima clan and lived a seemingly happy life in the capital on a government pension. For a former emperor that's unambitious as hell and insulting to your former subjects but it kept him and his family alive.