Mr. Algailany graduated from Iraq’s Anbar university with a degree in agriculture in the summer of 2014. But what should have been a milestone was the start of the worst days he ever saw. Islamic State invaded and besieged his hometown of Hit in Anbar province several months later. The militants threatened him and briefly kidnapped his brother, he said. Shortly after that, he decided he had no future in Iraq.

“We want our country to be better,” the 24-year-old said last month as he prepared to leave Baghdad for Europe. “But we are bound by impossible circumstances.”

Iraqi officials are increasingly talking about their concerns over a youth exodus that is draining talent and ambition from a country mired in conflict and economic turmoil. Some 50,000 Iraqis have for Europe in the past three months, according to United Nations estimates. Many are fleeing Islamic State, but others are simply hoping to find jobs—or better jobs—in Europe.

“I don’t encourage migration, but I cannot offer an alternative,” said Bushra al-Obaidi, a board member of the Iraq High Commission of Human Rights. “The state isn’t offering young people any opportunities.”