The Primordial Wyrm is the Calamity Mod's hidden endgame boss in the Abyss. How to summon it with Chaos State, where to fight it, its six phases and its drops.
The Primordial Wyrm is a hidden boss from the Calamity Mod for Terraria. You summon it by having the Chaos State debuff while you are in the Abyss, which you get by teleporting with a Rod of Discord or a Normality Relocator.
It is the only hidden boss you can meet in a normal world, and it is a true endgame fight with stats on par with the Exo Mechs and Supreme Calamitas. Most players take it on after both of them.

Notable drops:
Chaos State is the debuff you get when you teleport with the Rod of Discord or the Normality Relocator. The Rod of Discord drops from Chaos Elementals in the Underground Hallow during Hardmode, and the Normality Relocator is a post-Moon Lord tool crafted from it that teleports with a hotkey.
The Wyrm spawns as soon as you have Chaos State in any layer of the Abyss. It doesn't matter where you teleported: entering the Abyss while the debuff is still running counts too. Using a Potion of Return portal that leads into the Abyss spawns it as well.

In multiplayer, every player has to be in the same Abyss layer and at least one of them needs Chaos State. If you kill the Wyrm while you still have the debuff in the Abyss, it spawns again right away.
There is also a 1% chance to pull it up while fishing with the Trusty Old Rod in the Sulphurous Sea.
Note: You don't need to beat Polterghast first for it to drop its weapons. It can be fought early in Hardmode, but at that point it is close to impossible.
Fight it in the fourth and deepest layer of the Abyss. It enrages in every other layer, which makes it move and spin faster, summon more enemies and aim its lightning and Ice Mists better. It also starts pulling you toward its head from time to time.
The fourth layer is large and mostly empty, so it already works as an arena. Mine out stray blocks first so you don't get stuck during a charge, and don't swim too high while you dodge, since the third layer already counts as outside its home.
Note: The Sea King's "Help" button lets you breathe in the Abyss as long as you don't get hit.
It has 2,500,000 health in Classic, 4,000,000 in Expert, 4,800,000 in Revengeance, 6,000,000 in Master and 7,200,000 in Death Mode. The head has 100 defense and 40% damage reduction. Only the head of its 42 segments takes damage or hurts you on contact, so you can ignore the body.
A hit from the head deals 300 damage in Classic (600 in Expert) and gives you Hadopelagic Pressure, which drags you down.
In its first phase it rotates through these attacks:
As its health drops, stronger attacks replace some of the charges:
With close range weapons, stay right behind the head, since the body can't hurt you. With long range weapons, swim quickly up or down and let it chase you, then turn and shoot. Move across the path of the lightning bolts, not along it.
Save your mobility for the final 5%. Its last attack never stops, so bring enough damage to finish it quickly once it starts.
It always drops the Halibut Cannon, the Eidolic Wail, the Grand Dad and an Abyss Shell Fossil. It also drops 80 to 100 Voidstone, 21 to 32 Ectoplasm, 50 to 108 Lumenyl (65 to 135 in Expert) and 5 to 15 Omega Healing Potions.
The Halibut Cannon is its only unique item. It fires 25 to 35 bullets that slowly spread out, so it hits hardest up close. Its best modifier is Unreal.
Note: In a Get fixed boi world the Halibut Cannon is nerfed hard and fails to shoot 80% of the time, and Chaos State spawns the Wyrm in any biome.

For the other hidden bosses of the mod, see All Hidden Bosses And How To Summon Them. For the boss most players beat just before it, see How To Summon Supreme Calamitas.