Essex Fire Service was called at 10:09 BST on Sunday to a house in the village of Hockley after Olive was thought to have slipped while scratching.
"The animal was in distress and had become wedged in the gap," it said.
Firefighters from Hawkwell station used cutting equipment and air bags to release the pig, at 10:39 BST.
She was later happy to hog the limelight in photographs posted by the fire service on Twitter, with the hashtag #notjustfires.
One shows five officers with the rescued animal after the incident.
Sub-officer Gary Shinn said: "We believe the pig was on a concrete step and went for a scratch and ended up falling over and getting wedged upside down.
"Although distressed at first, she calmed down after a little stroke. The owner was very pleased to be reunited."
He added: "The crew has been to a few animal rescues, but never a pig."
Firefighters saved the bacon of a pig in a predicament after she became trapped on her back between a shed and a concrete slab.