Unlike the standard ば form of hypothetical phrases, ねば makes use of the classical Japanese auxiliary verb ず in its ね form. However, the meaning is the same as the modern なければ ‘if not (A)’. ねば connects to verbs in the same way as ない, and will then be followed by the negative form of なる ‘to become’, ならない.
will translate to ‘must do (A)’, or ‘have to do (A)’, and is simply a double negative that literally means ‘if not (A), it won’t be (B)’. This is a formal structure, and will mostly be found in literature.
I have to pay the electric bill by the 13th of this month.
That person is my senpai, more or less, so no matter what he says, I must obey him.
As ね is a form of the auxiliary verb ず, the base of する will change to せねば, in the same way it changes to せず in other grammar patterns.
I must clean before the guests arrive.
If you want to be able to speak Japanese better than you do now, you have to work harder.
Caution - Sometimes ならない will be replaced with ならぬ. This has exactly the same meaning and just makes use of the ぬ attributive form of the same auxiliary verb, ず.
I told my boss to leave it to me, so no matter what happens, I must succeed.
While not changing the meaning at all, the addition of ぬ will make the overall expression sound even more old-fashioned.
Fun-fact - As with other ‘must’ double-negative structures, the second part of the ねばならない may sometimes be omitted, resulting in ねば or せねば appearing by itself. This is similar to the modern ないと appearing without いけない following it.
It’s already so late! I must go home soon.
You guys are siblings, aren’t you? You guys have to be nice to each other.