ざる is another archaic form of the negative, and 得ない can be used to mean “cannot do/unable to”. Put together, the phrase is literally saying: “Cannot not do”. In other words, you have no choice but to do it. It is primarily used in formal speech and writing, though you will hear it in serious daily conversations.
【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 become しざる, but せざる instead.
English
Dictionary
Negative
Archaic Neg.
to go
行く
行かない
行かざる
to say
言う
言わない
言わざる
to eat
食べる
食べない
食べざる
to come
来る
来ない
来ざる
to do
する
しない
せざる
悪いことをしたので、すみませんと言わざるを得ない。
I did something bad, so I have no choice but to say sorry.
出張が入ってしまって、週末の旅行をキャンセルせざるを得ません。
A business trip came up, so I’ve got no choice but to cancel the holiday this weekend.
本当ならば、その事実を認めざるを得ないよね。
If 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.
自分のせいじゃないのに、謝らざるを得ないように感じる。
I feel I have no choice but to apologise despite not being at fault.