His statement suggests that he was at one time employed in a
diplomatic function (and that assumes that he had diplomatic "papers"
because of his employ), how does one lose that status, and is there
any action that he is required to take to relinquish that status?
Diplomatic personnel with official diplomatic status under the relevant treaties and for purposes of U.S. naturalization laws are credentialed by the U.S. Department of State. When an embassy and consulate wants to bring in a new diplomat, it provides their credentials to the State Department, which must approve the grant of diplomatic status to the person, although this decision is given very broad deference in practice.
The State Department could decline to credential someone due to an individualized history of prior misconduct (e.g. a known serial killer or war criminal who escaped prosecution due to diplomatic immunity), because the regime seeking to have the diplomat credentialed is no longer recognized as legitimate by the United States (e.g. the Assad regime of Syria), or because the total number of diplomats is excessive (e.g. if Luxembourg wanted to credential 1000 diplomats in the U.S.).
Mostly, however, the credentialing process is important because a diplomat's credentials can be revoked. This is usually done either in response to the individualized conduct of a particular person (for example, the person is discovered to be a spy with a diplomatic cover who is actively stealing key secrets from the United States), or as a symbolic form of sanctions for conduct of the diplomat's country of which the United States does not approve. For example, many countries revoked the credentials of many Russian diplomats after Russia assassinated a former Russian spy in Britain.
When a diplomat ends a tour of service in the United States, that diplomat's credentials are supposed to be withdrawn, in part, to prevent the number of credentialed diplomats from their country in the U.S. from being excessive. A credentialed diplomat is not required to be in the U.S. 24/7 while the credentials are in place. But, the country has some mild incentives not to have too many absentee diplomats. (The U.S. State Department could also unilaterally revoke the credentials of a diplomat known to be a long time absentee.)
It isn't clear to me in this case, if this individual's credentials had actually been formally withdrawn yet, or if he and his family were in the gap period between terminating his employment in the U.S. with the embassy and formally having his credentials withdrawn by his home country. In the former case, his children born in the U.S. are definitely U.S. citizens pursuant to the 14th Amendment and U.S. citizenship and naturalization laws. In the later case, the rule is less clear and it may be an issue of first impression not resolved by any prior case law regarding an issue that is arguably ambiguous under the statute.
Vox has a good description of the underlying facts in the case, in addition to a lot of analysis that I omit from the quoted material below:
Hoda Muthana’s father, Ahmed Ali Muthana, came to the US from Yemen in
1990 to serve as a diplomat representing his home country at the
United Nations, whose headquarters are located in New York City.
However, he lost that job — and thus his diplomatic immunity — as the
result of the Yemeni civil war in the mid-1990s. The question is
exactly when he lost his diplomatic privileges — and whether that
happened before Hoda was born, on October 28, 1994, or after.
The US government has told Ahmed Ali Muthana (according to his
lawsuit) that its records show he held diplomatic status until
February 6, 1995 — that is, until after Hoda’s birth — and therefore
that Hoda was born while he was still a diplomat and thus is not a US
citizen, but a Yemeni one.
Ahmed Ali Muthana, on the other hand, claims in a lawsuit that he
surrendered his diplomatic identity card on June 2, 1994 — months
before his daughter was born.
Legal experts I spoke to said that that wouldn’t necessarily mean he
officially lost his diplomatic status on that date, though. Steve
Vladeck, a law professor at the University of Texas at Austin, said
that under US law, ex-diplomats who are still in the country enjoy
some “residual immunity” while they pack their bags and prepare to
head back home.
But the Muthanas weren’t just wrapping up their affairs before
returning to Yemen; they were settling in the country for good.
Since the Muthanas credentials with the State Department weren't officially withdrawn until February 5, 1995, after his daughter was born, the question of whether he was a diplomat or not when she was born isn't a cut and dried one.
A lot of the argument in the case pertains to how the United States government treated this case before it was at issue when his daughter sought to travel to the United States as would be her right if she was a U.S. citizen. But, ultimately, all of this portion of the factual background is only pertinent to the extent that it sheds light on the official interpretation of the legal issues that the United States understood to be the case before the dispute arose. But, the United States government's interpretation of the law regarding when someone has diplomatic immunity, while it can be considered as persuasive authority, does not determine definitively if the United States government's previous interpretations of this law as applied to this case were legally correct. Either party is free to dispute any previous interpretation given to the law that was not established in a a disputed court case on the merits of the dispute.
The facts are also illuminated and complicated by a point made by @user6726 in his answer which points out that UN representatives don't have the full diplomatic immunities enjoyed by other diplomats.
Further more, if he failed to take some action to relinquish that
status, has he committed some crime?
He has not committed a crime.
First of all, upon the termination of his diplomatic status, he could have received a tourist visa which is available for several months, as a matter of course, to citizens of many nations who arrive in the U.S. without prior issuance of a visa.
Second, even if he and his family are present in the United States without any legal visa or citizenship authorizing them to be present in the United States, this merely means that as a civil (i.e. non-criminal) matter, he and his family may be deported. Overstaying a visa is not a crime.
Also, even he had committed a crime because, for example, after his diplomatic status ended he trafficked sex slaves to pimps in the U.S. in a manner that evaded a port of entry after having previously been convicted of the same offense (which would be a felony), this would not prevent his child, born in the United States while he did not have diplomatic credentials from being a U.S. citizen. Birthright citizenship under the 14th Amendment is available even to people who are illegally present in the United States and are deportable and even if that presence arose from a crime.
FOOTNOTE ON PROCEDURAL CONSIDERATIONS
Naively, this case also seems to raise some interesting issues of civil procedure and subject-matter jurisdiction.
Most questions related to immigration and nationalization law are heard in the first instance in Article II (Executive Branch) immigration courts which are administrative law courts, subject to appeal to an appellate Article II administrative law court called the BIA (Board of Immigration Appeals). Appeals from the BIA, in turn, are to the United States Court of Appeals for the appropriate circuit, an Article III (Judicial Branch) intermediate appellate court, and then to the U.S. Supreme Court.
A handful of questions related to immigration and naturalization law are, or may be, raised in the United States District Courts (an Article III trial court), subject to appeal to the United States Court of Appeals for the appropriate circuit, an Article III (Judicial Branch) intermediate appellate court, and then to the U.S. Supreme Court.
(I don't have the technical expertise to quickly and accurately summarize which cases belong in Article II immigration courts and which belong in Article III U.S. District Courts without considerable further research, but this isn't necessary to understand the jurisdictional conundrum posed by this case.)
But, court cases in which diplomats are parties are also in the original jurisdiction of the U.S. Supreme Court. The pertinent language of Section 2 of Article III of the United States Constitution states:
The judicial Power shall extend . . . to all Cases affecting
Ambassadors, other public Ministers and Counsuls . . . In all Cases
affecting Ambassadors, other public Ministers and Consuls . . . the
supreme Court shall have original Jurisdiction.
But, because the case law has held that this portion of the original jurisdiction of the U.S. Supreme Court clause vests concurrent rather than exclusive jurisdiction over these cases in the U.S. Supreme Court, this is not the barrier that it would naively seem to be.
Therefore, if the case were filed originally in the U.S. Supreme Court under its original jurisdiction, the U.S. Supreme Court could instead transfer the matter to another appropriate federal trial court, or could dismiss the case without prejudice on prudential grounds rather than because it lacked subject matter jurisdiction to hear original proceedings in the case.
If this had not been the case, it would have been tricky to resolve in this case, because the crux of the dispute is whether or not the father of the child was a diplomat at the relevant time, which is also the central fact that needs to be determined when one attempts to discern which court has jurisdiction over the case.
(Also, had this been an issue, pursuant to Federal Rule of Evidence 104, the evidentiary rules that apply to a preliminary determination regarding whether a court has subject matter jurisdiction are different that the normal evidentiary rules that apply to subsequent reconsiderations of the subject-matter jurisdiction question and the decision on the merits.)
Since the original jurisdiction of the U.S. Supreme Court regarding diplomatic matters is not exclusive, it does not raise complicated issues of subject matter jurisdiction, because both the U.S. Supreme Court and the ordinary trial court in cases like these both have subject matter jurisdiction.
There is also no doubt that the questions presented in this case are in the exclusive jurisdiction of the federal courts as opposed to state and local courts, unlike most federal questions over which the federal courts and state courts have concurrent jurisdiction.
SECOND FOOTNOTE RE POSSIBLE LOSS OF U.S. CITIZENSHIP
Another potential issue in this case is whether the daughter took actions that amounted to a voluntary renunciation of her U.S. citizenship in as an adult in connection with her alleged involvement with ISIS and loyalty oaths that may have been taken by her at that time. If she swore an oath of loyalty to ISIS that included an express renunciation of all claims she might have to citizenship in any other country or to any other sovereign, that could operate as a renunciation of her U.S. citizenship even if she was a citizen at birth. So far as I know, the litigation has not yet progressed far enough for this issue to be ripe for consideration yet, because you can't determine if someone has renounced their U.S. citizenship until you figure out if that person was a U.S. citizen in the first place.