Islamic State militants, who have been posting propaganda videos to TikTok, the social-media network known for lighthearted content popular with teenagers, have also been posting execution and torture videos to the site.

The videos, identified by social-media intelligence company Storyful, show balaclava-wearing militants grabbing captives, pushing them to the ground and beheading them with machetes. In another video, an assailant fires a gun at people at close range. The video is edited to show a burst of colorful confetti...