Get your taxes done using TurboTax

That wasn't the question.  The IRS does not honor state court custody orders -- the IRS makes its determination based on which parent the child lived with more than half the nights of the year.  That parent (the custodial parent) has certain rights.  The non-custodial parent has no rights to the child as a dependent unless the custodial parent signs a release form.  The non-custodial parent can't use the IRS to enforce a custody order or force the custodial parent to sign the release, but the non-custodial parent may be able to go to family court in their state to get an order for the custodial parent to sign the release.

Read more here, "children of divorced or separated parents". <a rel="nofollow" target="_blank" href="https://www.irs.gov/uac/about-publication-501">https://www.irs.gov/uac/about-publication-501</a>