How an inheritance is treated in bankruptcy depends on when you become entitled to receive it and what type of bankruptcy relief you're seeking.
Chapter 7 - if you become entitled to an inheritance within 180 days of your filing date, the inheritance will be a part of your bankruptcy estate, and can be used to pay your debts. The important date is when your right to the inheritance is fixed, which is typically on the date of a person's death. You might not receive property or money from someone's estate for many months.
Chapter 13 - your inheritance can be used in determining how much you have available to pay creditors under your repayment plan, and the 180-day limit doesn't apply.
In either type of bankruptcy, you must inform the bankruptcy trustee about the inheritance. If you're thinking about filing for bankruptcy, ask a bankruptcy lawyer how an expected inheritance might factor into your plans.