ざる is another archaic form of the negative and 得ない can be used to mean “cannot do”. Put together the phrase is saying: “Cannot not do”. In other words, you have no choice but to do. It is used in both conversation and writing.

【Verb: 〜ざる】を得ない
せざるを得ない = しないということをできない

Note that the phrase is almost identical in meaning to しないわけにはいかない.
To form the archaic negative for the verb we need only to replace ない with ざる. The verb “to do” is the only exception to this rule as it does not go to しざる but せざる instead.

English Dictionary Negative Archaic Neg.
to go 行く 行かない 行かざる
to say 言う 言わない 言わざる
to eat 食べる 食べない 食べざる
to come 来る 来ない 来ざる
to do する しない せざる
悪いことをしたので、すみませんと言わざるをえない。
I did something bad so I had no choice but to say sorry.
出張が入ってしまって、週末の旅行をキャンセルせざるを得ません。
A business trip came up and so I’ve got no choice to cancel the holiday this weekend.
本当ならば、その事実を認めざるを得ないよね。
It it’s true you’ll have no choice but to accept the fact.
政治家は新聞で不倫が暴露されて市長の立候補を辞退せざるを得なかった。
The politician’s infidelity was exposed in the newspapers and he had no choice but to withdraw his mayoral candidacy.
自分のせいじゃないのに、謝らざるを得ないように感じる。
Feel you must apologise despite not being at fault.

Send this to a friend