A 22-year-old Queens man has been busted trying to join ISIS, authorities said Tuesday.

Parveg Ahmed was deported back to the US from Saudia Arabia on Monday as he attempted to cross into Syria to joint the militant group, according to a newly unsealed indictment.

The Ozone Park man left a message for his family before traveling overseas, according to court papers, writing: “Forgive me if I was harsh/overbearing. Please remember all that I tried to teach you.”

He faces charges of attempting to provide material support to ISIS and is expected to face arraignment in Brooklyn federal court. If convicted, he faces life behind bars.

After Ahmed was taken into custody, authorities discovered disturbing images “associated with violent” groups on Ahmed’s phone, including “a picture of five men hanging by their necks with the caption ‘Gay men to be hanged,’ texts justifying attacks on the World Trade Center and a picture of the leader of ISIS, Abu Bakr al-Baghdadi.

Unsent messages were also found on the phone saying, “We will join the Jihad very son and in Sha Allah [God willing] we will then join the rans of the Shuhuda [martyrs],” the papers say.

Feds also uncovered various social-media accounts belonging to the young man in which he declared allegiance to the bloodthirsty group.

“Who are Jihadis? Muslims who fight to establish the Sharia IN THEIR OWN LANDS, wanted by MAJORITY of the people. USA are the real terrorists,” read one post from October 2014.

When Ahmed was first confronted by authorities in January at JFK as he returned from a trip to Bangladesh, he told them the social-media posts “were made at a low point in his life and at a time when he was smoking a large amount of marijuana,” according to court papers.

Agents then gained access to his home computer, where they found other disturbing propaganda, such as lectures by radical clerics Anwar al-Awlaki and Abdullah el-Faisal.

Ahmed had also bookmarked lectures in support of ISIS.