An Islamic philosopher in Karachi, an ideologue who provides violent ideas to some of Pakistan’s fiercest extremist groups, once told me that there are two kinds of history: dead and living. “Dead history is something on a shelf or in a museum,” he said. “Living history is part of your consciousness, something in your blood that inspires you.”

I was reminded of this last month during a conversation with a different kind of scholar. William McCants is the author of the excellent new book “The ISIS Apocalypse,” and he is nothing if not a student of “living history.” Mr. McCants looks at the Islamic State’s idea of the past and how the group’s adherents view their place in it. The picture that emerges is one of a terrific tension between the dead past and the ways in which it is being remade to fit the needs of the living present. The Islamic State’s treatment of history is particularly extreme, but a similar return of history is occurring with varying degrees of intensity all across the old world.

The jihadists in Syria and Iraq, Mr. McCants told me, are “infatuated” with Harun al-Rashid, the great Abbasid caliph whose court reportedly inspired “One Thousand and One Nights.” “They see him as the pinnacle of success, and the caliphate that he ruled over as the golden age,” Mr. McCants said, “but they elide all those parts of his rule that don’t mesh with their own.” The eighth-century caliph being idolized by the Islamic State practiced a far more lenient rule than Abu Bakr al-Baghdadi does. Harun was tolerant of Shiites and religious minorities. His court would engage in freewheeling debates over matters of faith. “You could play musical instruments,” Mr. McCants said. “He loved to drink wine, he loved men.”

That the Islamic State has made violent use of history shouldn’t come as a surprise. Perhaps more surprising is that in all those places where a modern nation has been grafted onto an ancient culture, history has returned with a vengeance. From Confucian China to Buddhist Myanmar to Hindu India, history has become the source of a fierce new conservatism that is being used to curb freedoms of women and stoke hatred of minorities. As the ultimate source of legitimacy, history has become a way for modernizing societies to procure the trappings of modernity while guarding themselves from its values.

When I was in Sri Lanka in 2013, the Bodu Bala Sena, a radical Buddhist nationalist group, had conjured up a prudish Buddha who scolded young girls about their clothes and told them what time they should be home at night. In reality, the Buddha, like many Eastern thinkers, was generally reticent on the subject of sexual morality. Sex concerned him only to the extent that it interfered with men realizing the fullness of their spiritual lives. ...