"It’s not evil. Just very old and angry. Sometimes it doesn’t care who gets hurt. That’s all.”
According to the legend, Eld Stagger had coated the entire Texas Hill Country in this darkness except for the territory owned by Momma Kodi, who held the curse back. When Stagger was defeated, the curse receded until it only occupied the part of the forest across the river from town.
When Kelly ventures into the forest at night to find Emma Lee, she encounters this curse as it emerges from the roots of the twisted tree in the clearing on the far side of the riverbed from town. It takes the form of a cloud of dark fog rolling across the ground, coating it about up to Kelly's knees. As the black mist conceals her feet, she is gripped with a sudden fear that it's going to swallow her up, dissolve her, or hold her in place. But it seems harmless.
During her trek, she notices that the black fog descends into the riverbed and then stops, as if it won't travel past a certain boundary.
Once she returns to the area the next morning, the fog is gone. The boy from the forest states that the shadow is an ancient, angry spirit with a will of its own.
Kelly and Garrett see it again when they go into the woods after dark to rescue Laylah. Once again, it stops at the riverbed. This time, though, when it touches the river, it instantly transforms the muddy riverbed into a raging rapid. It appears to have done this to give Anvilback and Drag-Belly a greater chance at killing Kodi, but the true reason for the furious river's appearance is not known.
The next morning, Kelly and the boy have an extended conversation where he reveals his true nature. The shadow in the woods is the Biblical Leviathan. He explains that the shadow was extracted from the darkness in the hearts of humans. The Leviathan's Father, the man who did this, was trying to cure evil. When the man discovered that much of evil had its origins in loneliness and ignorance, he separated these elements into their own living being, resulting in the boy.
The boy states that Momma Kodi and Firehide are two other aspects of the Leviathan, just like the boy and the shadow. Eld Stagger and his thugs are invaders, and the shadow came to obey them because it gives its loyalty to whoever is the strongest. The shadow is even easier to control when Stagger has the boy enslaved, which is why the Grim Halberdier is after him now.
Due to its subservience to Stagger, the Leviathan is clinging to his soul and preventing him from falling fully into death. It does not trade something for nothing, however, and it demands a soul for a soul. The Halberdier intends to sacrifice someone, preferably a child with an abundance of vitality, in order to resurrect a young and healthy Stagger. Because the Halberdier was the Leviathan's best chance of getting Stagger back, it clings to his soul in the same way. In the Halberdier's case, the Leviathan slowly mends his body and soul over the span of a hundred years. It seems to be limited in what damage it can undo, as the Halberdier still bears wounds from 1915.
The shadow is seen again the night Kelly leads the townsfolk to the clearing. As the sun sets, the Leviathan emerges from the base of the tree, surrounding the stone block where Laylah is lying. When the shadow touches Chester Cotton, he is forced to assume his true form.
The Leviathan appears to passively observe the Halberdier's defeat. However, when the crippled and severely wounded phantom manages to drag himself onto the sacrificial block, the shadow takes action, gathering itself beneath the twisted tree. This alerts Ethan that something is wrong, and he runs back to the clearing in time to witness the Halberdier decapitating himself.
Over Ethan's objections, the Leviathan engulfs the Halberdier. Due to his withered state, the Leviathan is only able to reconstruct a decomposed version of Stagger.
The Leviathan obeys Stagger's every command, and he uses it to great effect. First he instructs it to surround the town, trapping everyone in their homes, blocking every light source, and cloaking all of Grunwald in darkness. He then uses it to deflect attacks against his person, including a shotgun slug and Kelly's car. He also uses it to slow Firehide down so he can defeat his old nemesis in combat.
After surviving everything the town and its guardians can throw at him, Stagger finally uses the Leviathan to overwhelm and suffocate Momma Kodi and Firehide. His final use of the shadow is to lift Kelly and Garrett up into the air, holding them in place and torturing them with wringing.
Kelly's Mother, Sammie, Maggie, and Rachael stand up to Stagger, which revives and strengthens Kodi for one last attack. Kodi is again overpowered by the Leviathan, but the act makes Kelly realize that the other aspects respond to Ethan. She guesses, correctly, that the shadow obeys the Eld King because Ethan believes he is weaker than Stagger. She and Garrett encourage Ethan to try taking control.
Once Ethan tells himself that he is really the most powerful, the Leviathan immediately abandons Stagger and responds to him instead. It drops Kelly and Garrett before Stagger can strike them dead. Obeying Ethan's command, the Leviathan revives Kodi and Firehide in their true forms--extensions of itself. The shadow beasts destroy Stagger for good. The entirety of the shadow withdraws into Ethan's body, the whole Leviathan integrated as one being at last.