Your mortgage may be paid off before you pass away but it may be best to make arrangements for it in your estate plan.
An heir may inherit your mortgaged home after you pass away and Wills, Trusts & Estates Prof Blog takes a look at the issue in "What Happens When A Person With A Mortgage Passes Away?"
The answer to what happens to the mortgage and home after you pass away depends on to whom you leave the home in your estate plan.
If the person who inherits the home is closely related to you, then by law they can take over the mortgage. A spouse or child, for example, can elect to inherit the home and continue paying the mortgage.
However, as a practical matter if they are unable to continue the mortgage payments, then obviously they will have to do something else with the home.
You might consider in your estate plan ensuring that the heir will have enough other funds to pay off the mortgage.
If your designated heir is not a close relative, then he or she does not automatically get to take over the mortgage. Normally, lenders will let the person inheriting the home refinance the mortgage if he or she wishes to do so and is able to pay.
If the lender is unwilling to refinance and the home must be sold, then the remainder of the mortgage will usually be due at the time of the sale. An estate planning attorney can discuss the options with you.
Reference: Wills, Trusts & Estates Prof Blog (Nov. 23, 2015) "What Happens When A Person With A Mortgage Passes Away?"