In the Season 9 premiere ("Nice to Meet You, Walden Schmidt"), Alan leaves a note for Charlie that reads:
"Goodbye, Charlie. I'm taking the kids and getting out of here before you destroy us all."
The letter sets up Charlie's off‑screen death and Walden Schmidt's arrival.