The short answer is no…you do not have to surrender your home if you file for bankruptcy. If you are having financial trouble and problems making your ongoing mortgage payment, I would first recommend contacting your lender and trying to modify your mortgage. Some lenders will work with you, but if they are not willing to do, a Chapter 7 or Chapter 13 bankruptcy may be the right option for you.
If you are filing a Chapter 7 bankruptcy and you want to keep your house, you will have to be current on your mortgage. You will also need to continue to make payments on that mortgage and enter into a reaffirmation agreement with your lender. When you reaffirm your debt, you are agreeing to repay a debt (in this case, you are agreeing to continue to pay your mortgage) that would other be discharged in your bankruptcy. You would then need to continue making payments to the mortgage company under the reaffirmation agreement. If you breach this agreement and fail to make the monthly payments that have been agreed upon, the bank could then start foreclosure proceedings because you would have breached your promise to pay them.
If you are filing a Chapter 13 bankruptcy and you want to retain your home you can do so by continuing to make your ongoing mortgage payments. The advantage of filing a Chapter 13 when you want to keep your home is that you will have the ability to pay the mortgage arrearage over a period of 3-4 years through your bankruptcy plan. For example, if you have a $1000 mortgage payment per month and you have not paid anything to the mortgagor in 6 months, you will owe them $6,000 in arrears. In a Chapter 13 plan, you can pay this $6,000 over a period of 3-4 years and the bankruptcy will stop any foreclosure proceedings that may have been started or would ultimately be started.
Some people also have equity in their homes. In Missouri, we have the Homestead Exemption. You can exempt $15,000 in your home, according to MO. Ann. Stat. §513.475. That means that if you owe $100,000 on your home and it is worth $130,000, you will have $30,000 in equity. The Homestead Exemption will allow you to exempt $15,000, but you will still have $15,000 of non-exempt equity. The trustee will have you pay them the amount of non-exempt equity so that they can distribute it to your unsecured creditors. Rather than paying this amount to the trustee in one lump sum, you can pay this amount over time in your Chapter 13 plan and still be able to keep living in your home.
Both the Chapter 7 and the Chapter 13 bankruptcy options may enable you to keep your home, but it is in your best interest to contact a local attorney and speak to them about whether filing for bankruptcy will be a good option for you. They will be able to tell you how the bankruptcy laws will work in your situation and enable you to keep your home.