〜んがため(に)
in order to, for the sake of (strong resolve)
Verb ない-stem + んがため(に・の) (する → せんがため)
Sign up free to review this point on a spaced schedule.
んがため is a literary "in order to" with a sense of fierce determination: 勝たんがために、手段を選ばない, "he'll use any means to win".
It attaches to the ない-stem: 勝つ → 勝た + んがため, 知る → 知ら + んがため, 生きる → 生き + んがため, and する → せんがため.
The ん is the classical volitional む, so it literally means "for the sake of trying to". The purpose is usually serious: to win, to survive, to learn the truth, to realise a dream. The second half is often a desperate or extreme effort.
In everyday language, you'd use ために after the dictionary form (勝つために). Be careful with the shape: after 勝た, only んがため fits.
Examples
夢を実現させんがため、彼は必死に働いた。
He worked desperately to make his dream come true.
勝たんがために、手段を選ばない。
He'll use any means to win.
生きんがため、彼は盗みを働いた。
He stole in order to survive.
真実を知らんがため、彼は調査を続けた。
He kept investigating, determined to learn the truth.
合格せんがため、毎晩遅くまで勉強した。
To pass, I studied late into the night every night.