Usually not, if the foreclosure is on your personal home. The IRS treats most foreclosure-related attorney fees as a personal expense, and personal legal costs generally aren't deductible. The exception that matters most is business or investment context: if the property produced taxable income, or the legal fight was about protecting income or figuring out a tax bill, a deduction may be available. The 2017 tax law changes also matter here—miscellaneous itemized deductions subject to the 2% floor, which once caught some of these fees, are suspended for federal purposes from 2018 through 2025 under current law.
So the honest answer depends less on the word "foreclosure" and more on what the attorney actually did, what kind of property was involved, and which tax year you're filing for.
The core test: personal expense versus income-producing expense
The Internal Revenue Code draws a line between costs of earning income and costs of being a person with a life. Attorney fees land on whichever side of that line their purpose sits.
If a lawyer helped you negotiate with a lender to keep the roof over your head on your primary residence, that's a personal fight. The foreclosure threatened your shelter, not your business receipts. Personal legal fees aren't deductible, and there's no special foreclosure carve-out in the tax code that changes that.
If the same lawyer defended a foreclosure on a duplex you rented out, or on a building your LLC used to run a business, the analysis shifts. Fees incurred to protect income-producing property can often be deducted as an ordinary and necessary business expense or as a rental expense, depending on who owned the property and how the activity was reported.
The eCFR text for real estate investment trusts offers a useful illustration of the principle, even though it addresses a different taxpayer type. It says costs are "directly connected" with producing gross income when they have a "proximate and primary relationship" to earning that income, and lists interest, real estate taxes, and fees paid to an independent property manager as examples—while excluding general overhead and administrative salaries (26 CFR 1.857-3). That's the same logic you'd apply to your own rental property: fees that proximately protect the income stream are deductible; general personal or administrative costs aren't.
HUD's foreclosure regulations also acknowledge "Attorney's and trustee's fees and expenses actually incurred" as a line item in certain foreclosure cost contexts (24 CFR 203). That's a mortgage-insurance cost rule, not a tax rule—don't confuse the two. It tells you the fee exists and is real; it says nothing about deductibility.
Where the fees commonly show up in a foreclosure
Foreclosure attorney fees rarely arrive as one clean line. They're usually bundled into the reinstatement quote, the payoff statement, or the trustee's fee schedule. Knowing what each charge is for helps you decide whether any portion has a tax home that isn't "personal."
Typical categories:
Loan reinstatement or modification negotiation. Personal if it's your home. Defending a judicial foreclosure action. Personal if it's your home; business if tied to income property. Bankruptcy filing to stop foreclosure. The fee itself usually isn't deductible, but bankruptcy advice or tax advice embedded in the work sometimes is. Tax advice about the foreclosure's consequences. This can be deductible under the general rule for fees paid for tax counsel, subject to the itemized-deduction limits discussed below. Trustee or foreclosure-sale fees. Often paid out of sale proceeds and treated as selling costs, which affects gain or loss rather than creating a standalone deduction.
That last point trips people up. If the lender's attorney fees get added to your loan balance and then paid from the foreclosure sale price, they may function as part of the transaction, not as something you write off separately.
The 2018–2025 suspension of miscellaneous itemized deductions
Before 2018, some legal fees—such as fees to determine or collect a tax liability, or to produce income not tied to a trade or business—were deductible as miscellaneous itemized deductions, but only above 2% of adjusted gross income. The Tax Cuts and Jobs Act suspended those deductions for individual taxpayers for tax years 2018 through 2025.
That suspension is why a lot of older guidance you'll find online reads confusingly. Articles written before 2018 describe fee categories that were technically deductible but often produced no actual benefit because of the 2% floor. For the 2026 filing season covering tax year 2025, the suspension still applies. For tax year 2026 and beyond, it's scheduled to lapse unless Congress extends it—and that's a real check-you-must-make item, not something to assume.
One wrinkle: the suspension applies to individuals. If the fees belong to a business—a sole proprietorship reporting on Schedule C, a partnership, or a corporation—the business-expense deduction is a different animal and wasn't suspended. That's why the entity and the activity matter more than the foreclosure label.
The specific exception that often survives: fees to resolve a tax dispute
Fees paid to determine, contest, or collect a tax liability have long been treated as deductible in principle. If you hired an attorney to fight an IRS assessment arising from foreclosure debt cancellation, or to get advice on how the foreclosure affects your return, that portion of the fee may qualify.
The practical catch is the same 2% floor and the current suspension. For most individuals in 2025, even a genuinely deductible tax-related fee may yield no tax benefit because it's a suspended miscellaneous itemized deduction. Business owners and trusts have different rules and different results.
If the fee is large enough that the distinction matters, the right move is to get the attorney's invoice itemized by task—tax advice, business defense, personal negotiation—so the deductible portion, if any, is separable. A single lump-sum invoice is harder to allocate later.
Rental property and investment property
This is where deductions get real. Say you own a four-unit building, the lender starts foreclosure after you fall behind, and you pay a lawyer to negotiate a loan modification that keeps the building rented. Those fees protect rental income. On Schedule E, they'd typically be deductible as a rental expense in the year paid, subject to the usual rules for rental activities and passive loss limits.
A worked illustration, using illustrative figures only, not actual market rates: suppose the attorney bills $6,000 for the modification work and you collect $30,000 in annual rent from the building. If the whole fee is properly allocable to preserving the rental income stream, you'd report $24,000 of net rental income before other expenses. The deduction's value depends on your marginal rate and whether passive loss rules limit it—those variables matter far more than the fee amount itself.
Contrast that with a $6,000 fee on your primary residence. No rental income, no business activity, no deduction. Same dollar amount, same service, radically different tax result.
One caution: if the property was held for personal use, or the rental activity was so minimal it wasn't conducted for profit, the business-expense argument weakens. The IRS looks at whether the activity had a genuine profit motive.
Foreclosure on a home office or mixed-use property
Allocations get messy here. If you deducted a home office on a house that later went into foreclosure, some courts and IRS guidance would let you treat the allocable portion of legal fees as a business expense—but only the portion tied to the business use. The personal portion stays nondeductible.
Documentation wins these cases. A home-office deduction claimed in prior years, a business license, separate utility records, and an attorney invoice describing business-related work all help. A bare assertion that "part of the house was for work" usually doesn't survive scrutiny.
Nonrecourse debt and the phantom income interaction
Foreclosure often cancels debt, and canceled debt is generally taxable income unless an exclusion applies. The main home exclusion under Internal Revenue Code Section 108 has been extended and modified repeatedly, so the applicable year and dollar limits must be checked against the statute in effect for your tax year.
Here's the subtle interaction with fees: fees paid out of foreclosure proceeds can reduce the amount of debt treated as canceled, or increase your basis-related loss, depending on how the transaction is structured. That's not a deduction in the ordinary sense—it's a measurement issue. It changes the arithmetic of the gain or loss and the cancellation income, not the Schedule A line.
Where fees are paid directly by you to the attorney, separate from the sale, they're more likely to be analyzed as their own deduction question.
Bankruptcy-adjacent fees
People often file bankruptcy specifically to stop a foreclosure. Can the bankruptcy attorney's fee be deducted? Generally no, if the bankruptcy was personal. The Catalano case, a Tax Court decision, allowed a portion of bankruptcy fees as a business expense where the bankruptcy was "proximately caused by liabilities arising from his law firm"—meaning the bankruptcy was essentially a business event, not a personal one (Catalano v. Commissioner).
That case is a narrow fact pattern, but it illustrates the principle cleanly: the deductibility follows the reason for the proceeding, not its label. A consumer bankruptcy driven by medical bills or a layoff is personal. A bankruptcy forced by business liabilities may support an allocable business deduction.
Practical documentation checklist
Whether you're claiming a deduction or just trying to understand your return, the same records matter:
1: Get an itemized attorney invoice separating personal negotiation, business or rental defense, and tax advice. 2: Keep the foreclosure complaint, the payoff statement, and the trustee's fee schedule, which often show how fees were applied. 3: Save prior-year returns showing rental or business activity on the property. 4: Note the tax year each fee was paid—cash-basis taxpayers deduct in the year of payment. 5: If debt was canceled, keep Form 1099-C and any exclusion worksheets.
The success check is simple: can you point to a specific income-producing activity or tax dispute that each fee served? If the answer is "it protected my home and nothing else," the deduction likely fails. If the answer is "it protected rental receipts" or "it resolved a tax bill," you have a defensible position, subject to the year's deduction rules.
Questions people actually ask
Can I deduct attorney fees if the foreclosure never happened? The deduction question is the same whether or not the sale goes through. What matters is the purpose of the legal work, not the outcome.
Do fees count as part of the cost basis of the property? Sometimes. Fees incurred in connection with the sale or disposition can adjust gain or loss rather than being a separate deduction. That's a different computation and worth separating from the Schedule A or Schedule E question.
What if I paid the fees years ago and just found the receipt? Amended returns are generally possible within three years of filing, or two years of payment, whichever is later. For older years, the 2018–2025 suspension and the 2% floor likely limit any benefit anyway.
Does state tax treatment match the federal treatment? Not always. Some states conform to federal itemized deduction rules, others don't, and a few have their own miscellaneous deduction categories. Check your state's instructions for the specific tax year.
Are fees paid by the lender deductible to me? Usually not. If the lender incurred the fee and charged it to your loan balance or paid it from sale proceeds, it's not your out-of-pocket deduction; at most it factors into the transaction math.
What about a short sale instead of foreclosure? The fee analysis mirrors foreclosure: personal if the home is personal, potentially deductible if rental or business property. Short sale fees are frequently netted against proceeds, which again makes them a gain-or-loss item rather than a deduction.
The throughline across all of these: the word "foreclosure" isn't the trigger. The income-producing purpose of the legal work is.
This article is general education about federal tax principles, not individual tax, legal, or financial advice. Deductibility turns on your specific facts, entity type, and tax year, and the rules discussed—including the miscellaneous itemized deduction suspension—can change. Confirm your situation with a qualified tax professional or enrolled agent who can review your documents, and consult a tax attorney for anything involving a pending IRS dispute.