If the child was your stepchild, IRS regulations state that the adoption of a stepchild does not qualify for the adoption credit, even if you are no longer married to that person when the adoption is finalized.
The IRS guidance specifically states that even if the adoption takes place after a divorce, it is still considered a stepchild adoption for tax purposes, as it is an intrafamily adoption.
This child was not my step child at the time of my marriage.
I was married to her father, but the child's biological mother and father had 50/50 custody of her.
I had zero legal ties to the child.
So would that still be considered a "stepchild"?
Yes. You can’t claim the adoption credit if you adopt your spouse’s child (that is, your stepchild). Your relationship to the child is based on the spousal relationship even if you are divorced before the adoption. The marriage is the legal tie. The relationship of a stepchild survives divorce for tax purposes.
See the IRS Instructions for Form 8839. this IRS tax tip and this TurboTax tips article for more information.