There’s a long-running tradition in the West and in the Middle East of a wall someplace far to the east that holds back the hideous forces of Gog and Magog. The story originates in the Bible, continues through an ancient history, and winds up in its final version in the Koran and in fictional tales of Alexander the Great. The story is great material for RPGs!
The Bible is unclear on who or what Gog and Magog actually are. Genesis and First Chronicles have Magog as a grandson of Noah. Separately, Ezekiel prophesies that Gog will be the king of the land of Magog and the head of a coalition of nations arrayed against Israel. God assures Israel that He will smite the coalition. So many of Gog’s soldiers will die that it will take the Israelites seven months to bury them all. In the book of Revelations, Gog and Magog are nations allied with Satan at the end of days. Their forces will be as numerous as grains of sand on the seashore. They will march against the city of God’s people, but God will smite them with fire and everything will work out fine.
The first-century A.D. Jewish historian Josephus tied the nation of Magog to the story of Alexander the Great. He gives Magog, grandson of Noah, as the ancestor of the Scythians, a real horse nomad culture from the Eurasian steppes. During Alexander’s conquest of Persia (4th century B.C.), Josephus has him building an iron gate southeast of the Caspian Sea in a passage between two mountains. This gate supposedly kept the Scythians from entering Persia, though Josephus gives two occasions when the gate was opened to let the Scythians (Magogites) through, with ghastly results.
From Josephus, the idea stuck in the late Roman and Medieval consciousness. Somewhere in Asia, there was a mighty wall, usually built by Alexander the Great, that held back the terrifying hordes of Gog and Magog. You can find the wall in stories and art. It even appears on maps. Even Marco Polo puts Gog and Magog north of China, possibly because of the Great Wall the Chinese used to defend against the steppe peoples.
From these stories of Alexander, Gog and Magog entered the Koran. The text tells of a prince named Dhul Qarnayn who traveled far to the east. There, between two mountains, he encountered a people whom he could barely understand. They told Dhul Qarnayn the nations of Gog and Magog (Yajuj and Majuj) were despoiling the land. Dhul Qarnayn helped the people build a wall of iron, then covered it in copper. The forces of Gog and Magog were powerless to penetrate the wall. But in the end times, the wall would crumble and release Gog and Magog upon the world.
Gog and Magog have come to be associated with virtually every eastern people to threaten the Jewish, Christian, or Muslim worlds: Lydians, Scythians, Huns, Magyars, Arabs, Khazars, Mongols, and even the Soviet Union. In truth, the wall keeping out Gog and Magog does not exist, though there have been many attempts to link it to real walls in the region.
The wall containing Gog and Magog makes a great setting detail. In a fantasy game, it works very much as presented. In a high-magic variant, it can guard the way to Hell. In science fiction, it’s a fortress-like space station guarding a stable wormhole or a portal to another dimension. In pre-1960s Earth, the PCs might find the wall tucked away in some unexplored corner of the Amazon or the highlands of New Guinea.
You can use the wall as an edge on the map beyond which you don’t want your PCs exploring. Or you can make the wall metaphorical, like the veil between worlds in some New Age beliefs or the Membrane between the universe and the Outer Dark in The Esoterrorists.
But it’s better to use the wall as a source of plot hooks. It’s redoubtable, but it’s ancient – and it may well be failing. Perhaps the PCs encounter a dangerous warrior causing trouble out in the world. After they defeat her, they examine her clothes and weapons and find they’re like nothing they’ve seen. Research reveals she is from the land of Gog and Magog. But how could she come here to the civilized world? The PCs will need to find the wall and determine what’s wrong with it.
While the wall is powerful, it is ancient, and Gog and Magog have been assailing it for millennia. Cracks have opened large enough for individual infiltrators to wriggle through. There’s an entire band of them encamped on the civilized side of the wall! The PCs will have to defeat this camp and seal the cracks. If they’re successful, they can keep out the gathered horde for another thousand years.