In your lifetime, you may incur debts related to legal services. In other words, you will probably end up owing one attorney a lot of money. So the question is then whether you can discharge attorney fees that you owe through bankruptcy. The simple answer is YES. But there are two exceptions: 1) the fees are owed to your current bankruptcy attorney, and 2) attorney's fees that are a part of child support and alimony awards.
If you owe attorney fees for any services that are not connected to your current bankruptcy case, then you would include the fees as debt that you would like discharged through bankruptcy. The attorneys you owe money to would then be treated like any other creditors you owe.
You may be wondering why you cannot discharge the fees you owe to your current bankruptcy attorney. But the logic here is that if you could discharge your current bankruptcy attorney's fees, then your attorney would be forced to provide free legal service involuntarily. If this were the case, then you would have a terribly difficult time finding a hardworking attorney willing or even able to take on your bankruptcy case.