〜はずだった
was supposed to, should have
Plain form + はずだった / はずじゃなかった
Sign up free to review this point on a spaced schedule.
はずだった is the past of はず (N4): something was expected, but didn't happen as planned. 電車は九時に着くはずだった, "the train was supposed to arrive at nine".
It often continues with のに or が to say what actually happened: 彼も来るはずだったのに、来なかった, "he was supposed to come too, but he didn't".
はずじゃなかった means "it wasn't supposed to be like this": こんなはずじゃなかった, a common sigh of disappointment.
Compare つもりだった, which is what someone intended, and ところだった, "nearly". はずだった is about what should have happened, based on plans or reasoning.
Examples
電車は九時に着くはずだった。
The train was supposed to arrive at nine.
今日は彼も来るはずだったのに、来なかった。
He was supposed to come today too, but he didn't.
こんなはずじゃなかった。
This isn't how it was supposed to go.
計画では、もう終わっているはずだった。
According to the plan, it should have been finished by now.
鍵はかばんに入れたはずだったのに、ない。
I was sure I'd put the key in my bag, but it's not there.