Línsǐ de shíhou, tā zhōngyú shuō chū le zhēnxiàng.
At the point of death, she finally told the truth.
Tips
usage
临死 is often used with 前 (before) as 临死前 meaning 'before death' or 'on one's deathbed.' It conveys a more literary or dramatic tone than simply saying 快死了.