Fetching details from the dictionary...

hour of death; one's last moments; end of one's life
「末期」 has another reading with different meanings.
祖父は末期のがんと診断されました。
My grandfather was diagnosed with terminal cancer.
会社は末期的な状態に陥っていました。
The company was in its final stages.
江戸時代末期に起きた歴史的な出来事です。
This is an event from the end of the Edo period.