I think he was ostensibly Muslim, but he was a Muslim who would have been executed in Iran or KSA for blasphemy and witchcraft because of his own claims-over a decade ago. Those practices are considered apostate to hardliners and are capital offenses. The first thing we know about him other than him being a refugee is that he was doing astrology, claiming mystical powers, witchcraft, etc. He called himself 'shaikh' something. That doesn't make him a cleric. I have not seen any reports that he had any kind of mosque or following, but only that he ran a spiritistic practice, is thought to have arranged to have his wife killed, abused military families, is under indictment for sexuallly abusing a bunch of women (while playing at the mystic bit). He was a fraud and a con man, jerk and a criminal who knew the whole world was coming down on him.He was desperate and wanted someone to take note of him and he knew that his life was effectively over with all the charges coming down on him. He was nobodies hero and was looking at a lifetime in prison.
ISIS may claim him, they may not, but I think that he only used the Islam bit for some more attention at his last hurrah. Otherwise he will just be a forgotten loser.
Do I think he was livid about the military in Afghanistan? Yep, and it likely informed his decision to play the jihadist game. He was a refugee and he knows what kind of hell the people are being put through because of military intervention by the west. And I am sure that in his head it is ALL the responsibility of the west. And now, after 20 hours of this standoff, and dying in it, he got what he wanted-finally. Attention.