[verb (dictionary form)] + 羽目になる [verb ない-form] + 羽目になる
羽目になる means "end up having to": things went wrong, and now you are stuck with something unpleasant, often through your own doing. It follows a verb in the dictionary form and is nearly always in the past, 羽目になった.
The first half usually gives the cause, with せいで, ばかりに, ために or a て-form. The outcome is always unwelcome; a good result takes ことになった instead.
羽目になる is everyday Japanese, spoken and written, and is often spelled はめになる. はめ羽目におちいる陥る is a written variant.