Ghost, a Swedish heavy-metal band, built a cult following over a decade using demonic pageantry and rhyming lyrics like “hypnotizing horns of ram” and “paralyzing pentagram.”

Band members perform in eerie masks and keep their identities secret, adding to the group’s mystique.

It all worked like a charm—until a recent lawsuit unmasked the...