Deductions & credits

@AmeliesUncle 

You underlined the wrong part of the example.  

As a result, he isn't considered in the custody of his parents for more than half of the year

That’s automatic disqualification for qualifying child.  If the IRS wanted to say “the special rules don’t apply and the child is treated as living with the parent they lived with” it would have said that instead.  

Also, pay close attention to example 6.  The child lives with the mother for five months and the father for 7 months, but is emancipated after living with the father for two months.  Because the child lived with the mother more than half the time before it was emancipated, and does not live with either parent after being emancipated, the mother can claim the child in example 6.  

Example 6 only makes sense if the child lives with neither parent after being emancipated.  Using your understanding of the situation, the father would claim the child in example 6.

 

Publication 501 very clearly says the child is not considered to be in the custody of their parents after being emancipated. It doesn’t say, backstop to a different definition of custody, it says not in custody.

 

And yes, this does mean that the parent loses “qualifying child“ after the child is emancipated, if the parents are divorced or separated. It might not sound fair, and it might even not have been intentional, but that’s the way the law was written.   (It also means that a child of divorced or separated parents can receive substantial tax benefits once they turn 18, that a child of an intact family might not receive.  Somebody loses and somebody else wins.)