A former Iredell County teacher was being investigated for 24 counts of molestation with a student at the time of his death, Iredell County deputies said.