In the United States, you can legally keep a deceased relative's passport. The website U.S. Passport Service Guide quotes the National Passport Information Center (NPIC) as saying it is legal to simply do nothing with such a passport. NPIC is the call center for the Department of State's Passport Services. Just hold on to the passport and keep it safe. Until it expires, it is still possible for someone to steal it and use it fraudulently.
If you're more worried about security than nostalgia, you can mail in the passport of a deceased relative for cancellation. Send it to the Consular Lost and Stolen Passport (CLASP) unit of Passport Services. The address is: Attention CLASP; 1111 19th St. N.W., Suite 500; Washington, D.C. 20036. Include a copy of your relative's death certificate and a letter requesting cancellation of the passport.