Because your child was emancipated before the six month mark of 2020, the special rules for children of divorced or separated parents do not apply to your child. You cannot claim the child as a dependent on the basis of a court order or even if the other parent voluntarily gives you a form 8332. The only way you could claim the child as a dependent is if the child lived in your home more than half the nights of the year. If this is the case, and the other parent will not give you the Social Security number, you may be able to obtain it from your family law attorney, or the Social Security administration by providing proof that you have the legal right to this information.
@Opus 17 - great answer, but it the child is emancipated and living with Dad, you would think it pretty easy for Dad to obtain the SS# directly from the emancipated child as Mom is out of the picture, just saying 😉
"emancipated" is a poor term and is not used in the tax code since a person under 19 can be emancipated.
but under the tax code could still be a taxpayer's qualifying child.
here is the tax code definition of a qualifying child -your dependent
1) Related to the taxpayer - thus both you and your ex meet this test
2) in your situation you must be the custodial parent or your ex, if she's the custodial parent, provides you with a signed form 8332
the custodial parent (the parent with whom the child resides for the greater number of nights during the year) is the one that the IRS says has the right to claim your son as a dependent assuming the other tests for qualifying dependent are met.
3) If not a full-time student, under 19 at the end of the tax year. If a full-time student under 24 at end of the tax year (so emancipated is meaningless if this test is met)
4) Hasn’t provided over ½ his/her own support
you'll notice that it's not whether you or your ex provided over 1/2 of his support, it's that he didn't provide over 1/2 of his own support. if he did then he is not a qualifying child or relative (see below) for either of you.
if he didn't provide over 1/2 his support and is not a qualifying child because any of the tests above are failed (like his age) he could be a qualifying relative if
1) he's related - again you both of you meet this test
2) his gross income for 2020 is less than $4,300 (if over neither can claim)
3) you provide over ½ his support