During the years leading up to the mortgage crisis and collapse of late 2008, second mortgages borrowed against the equity of a home were common. People felt comfortable taking them out because home values continued to soar, meaning that there was a low perceived risk at the time of using that extra equity to pay for college, home remodeling, or other various expenses. Only after the bottom dropped out of the real estate market in the 2008 economic collapse did these second mortgages become serious problems for those with homes that continued to fall underwater.
Most of the time, an unsecured debt is discharged in a Chapter 7 bankruptcy. A second mortgage, even though it's considered unsecured to the point that its principal balance exceeds the value of the home it is secured by, has been determined by the Supreme Court that it cannot be avoided in a Chapter 7 bankruptcy. Thus, while it makes sense that a motion to avoid a lien under Sections 506 or 522, the Supreme Court has decided as a matter of policy that second mortgages cannot be avoided and discharged as unsecured in Chapter 7.
While this may leave certain debtors who want to keep their home but cannot afford the second mortgage in a bind, there are other options as well. Certain jurisdictions allow what is called a Chapter 20, or lien stripping, which is essentially the filing of Chapter 7 to discharge all of your unsecured debt, then the filing of Chapter 13 after to avoid the second mortgage and pay a minimal amount on it. You would need to consult your attorney to see if this is available in your area, as it is controversial and not accepted in many jurisdictions.
The best option, then, is to file a Chapter 13 to avoid the lien. If the primary purpose of your bankruptcy is to get rid of the second mortgage, then you can consult your attorney to see if you qualify for a 10% Chapter 13 plan. You can then avoid the second mortgage on your home and pay back only 10% of the principal balance on it. There are obviously certain requirements that go into whether you can qualify to pay back this amount, so it is best to speak with a Chicago bankruptcy attorney to discuss these options.