between a rock and a hard place; out of the frying pan into the fire
Proverbial expression for a situation where avoiding one danger leads to another, or one is trapped between two threats. The literal image is a tiger at the front gate and a wolf at the back gate.
He tried to escape the debt collector, but it was out of the frying pan into the fire—he got caught by another lender.
Quitting without having another job lined up could easily become a case of jumping out of the frying pan into the fire.
A classical Chinese proverb (前門拒虎,後門進狼) that entered Japanese. The literal meaning is 'a tiger at the front gate, a wolf at the back gate,' used to describe a dilemma where escaping one danger leads to another.