Yes. There are mortgage life insurance policies that payout a death benefit upon the death of the insured person.
Upon your passing, your beneficiary will receive the death benefit proceeds from your life insurance plan which can be used to pay off the outstanding balance owed on your home mortgage loan so you family can remain in their home.
Here's how to get mortgage insurance to cover death.