“This is an abject failure, that there is no system in place that doesn’t result in spending 20 years in jail,” said Seamus Hughes, a former National Counterterrorism Center official who once helped implement the Obama administration’s strategy for countering violent extremism.

The Justice Department’s campaign against American supporters of the Islamic State is rife with examples of family members acting out of desperation. Mothers have hidden passports and money to keep their sons from traveling. In Minnesota, a fight broke out as relatives tried to keep a young man from flying out of the country. In Texas, a family lured a 19-year-old home from Turkey by tricking him into thinking his mother had fallen ill.

Mr. Shafi chose a different route. He did what the government asked. His story is a desperate search for someone to help his son.

A Frantic Call

The Shafis were vacationing in Cairo in the summer of 2014, visiting extended family, when they awoke on a Saturday to find Adam gone. He sent a text message to a younger brother, saying he had left “to protect Muslims.”

Mr. Shafi has never been deeply religious — “don’t do bad things,” is how he describes his faith — but his son had embraced religion. Outwardly at least, that meant charity. He made sandwiches and delivered them to San Francisco’s homeless. He talked about opening a free health clinic. Perhaps, Mr. Shafi thought, Adam, who was 21 at the time, was at a mosque working on a social cause.

But when he did not come home, Mr. Shafi became frantic. A protective father of five, he had installed tracking software on his children’s phones. But it did not work overseas. On Sunday, he called the American Embassy in Cairo. An official there was polite but dismissive and told him to wait another day.