“I may not be enlisted anymore, but I’m still a warrior,” said Mr. Maxwell, who left the Marines with an honorable discharge in 2011. “I figured if I could walk away from here and kill as many of the bad guys as I could, that would be a good thing.”

Mr. Maxwell is one of a small number of Americans — many of them former members of the military — who have volunteered in recent months to take up arms against the militants in Iraq and Syria, even as the United States government has hesitated to put combat troops on the ground. Driven by a blend of motivations — outrage over the Islamic State’s atrocities, boredom with civilian life back home, dismay that an enemy they tried to neutralize is stronger than ever — they have offered themselves as pro bono advisers and riflemen in local militias.

“More than anything, they don’t like ISIS and want to help,” said Matthew VanDyke, an American filmmaker who has spent time this winter with four American veterans covertly training a militia of Assyrian Christians in northern Iraq to resist the Islamic State. He is now recruiting more veterans to help, though late in February, the American Mesopotamian Organization, a California-based nonprofit that helped fund the militia, broke ties with him.

In a phone interview from Iraq, Mr. VanDyke said that many veterans spent years honing combat skills in war only to have them shelved in civilian life and that they are eager for a new mission.

“A lot of guys did important stuff overseas and came home and got stuck in menial jobs, which can be really hard,” he said. “We offer them kind of a dream job, a chance to do what they are trained to do without all the red tape and PowerPoints.”