noun
Legal term for a document stating how one's property and affairs should be handled after death.
彼は遺言で全財産を妻に残した。
He left all his property to his wife in his will.
遺書 is a broader term for a note left before death, often a suicide note, while 遺言 specifically refers to a legal will.
From 遺 (leave behind) and 言 (words), literally 'words left behind'.