Role in the series
There is more than one version of Spider-Ham that appears in the show, including a version Spider-Man imagined in "Flight of the Iron Spider", one that was Spider-Man himself transformed in "Run Pig Run", and an alternate universe version in "Spider-Verse".
Run Pig Run
The version that was Spider-Man turned into a pig was a part of Loki's revenge scheme against Spider-Man for ruining his plans. This was also the time of the Agardsreia hunt, making Spider-Man a target of Asgard's finest hunters led by Executioner. While running, Thor tells Spider-Ham that he must keep him alive until the hunt ends at sundown. Thor throws Spider-Ham and his hammer towards Midtown High School. Thor brings Spider-Ham to Phil Coulson, Power Man, Iron Fist, White Tiger, and Nova just as Executioner and the other hunters arrive. Phil Coulson arrives where he and Thor hold off the hunters while the others get Spider-Ham out of there. While on the S.H.I.E.L.D. Helicarrier, Nick Fury helps to protect Spider-Ham when the wolves that the hunters ride on sprout wings and attack the S.H.I.E.L.D. Helicarrier. While Thor, Phil Coulson, and Spider-Ham's team fight Executioner and the hunters, Spider-Ham ends up calling out Loki and fights him. Not wanting his friends to sacrifice themselves for him, Spider-Ham fights Executioner. Before Executioner can land the killing blow on Spider-Ham, the sun sets ending the hunt. Spider-Ham changes back to Spider-Man and punches Loki.
Spider-man later encounters Spider-Ham in his alternate universe as he chases the Green Goblin across the multiverse.