BEIJING—The militant group calling itself Islamic State on Wednesday said it had executed two hostages, one Chinese and the other Norwegian, releasing images in the latest issue of its official English-language magazine Dabiq purporting to show the two men had been shot to death.

It was unclear when Ole Johan Grimsgaard-Ofstad, 48, from Oslo, and Fan Jinghui, a 50-year-old freelance consultant from Beijing, had been taken captive by the extremist group. They were depicted as being dressed in yellow jump suits in photos in...