If you say that someone does something for dear life or for their life, you mean that they do it using all their strength and effort because they are in a dangerous or urgent situation.
[informal, emphasis] I made for the life raft and hung on for dear life.