Oh I got it! It's "lest":

He studied the whole night, lest he wouldn't do well on the exam.

Thank you for the suggestions guys!