This letter template can be used to explain with regrets that you cannot accept a job offer after all, due to an unexpected change in personal circumstances.
It is with great regret that I write to retract my acceptance of the job offer proffered to me last week.
After I made my commitment to you, a significant family challenge arose, and I am no longer able to take on this new role. I wanted to bring my best to XYZ Corporation, and that’s not possible given this new development.
I apologize for the inconvenience this will surely cause. I’m sure you understand that this is nothing I could have predicted when I agreed to come on board.