One misconception about bankruptcy is that you cannot go through a Chapter 7 bankruptcy or a Chapter 13 bankruptcy and keep your home. Generally, provided the home does not have significant equity, this is simply not true.
The filing of a Bankruptcy petition will put an immediate stay on foreclosure proceedings. This stay remains in effect until the secured mortgage holder is granted permission by the court to continue with the foreclosure, or until the Bankruptcy case is closed or dismissed. The stay on foreclosure created by the Bankruptcy can provide the necessary time the homeowner needs to sell the property or cure the default on the mortgage.
As an alternative to using the filing of a Bankruptcy petition to simply buy time, an individual can move forward with a Chapter 13 Bankruptcy plan that includes the home and accompanying mortgage(s), and allows the borrower to cure the default over the course of carrying out the Bankruptcy plan. In other words, the mortgage lender is treated similarly to other creditors in the plan, and once the final plan payments have been made and a discharge granted, the borrower is no longer facing foreclosure and remains in the home.
Second mortgages are given special treatment in Chapter 13 Bankruptcy. In circumstances where more money is owed on the first mortgage than the home is worth, the second mortgage can often be treated as an unsecured creditor. The effect of this treatment is that, like other unsecured creditors (credit card companies, etc), once the debtor completes the plan and receives a discharge, the second mortgage is extinguished. The homeowner remains in the home, continues paying on the first mortgage, and the second mortgage is “stripped off” of the property and discharged along with other unsecured debt.