A specialist rescue team from Plymouth and firefighters from Holsworthy and Okehampton supported by a local farmer took three hours to rescue the animal.
She became trapped at around 11.30am at Northcombe, Germansweek in Beaworthy on Friday.
A spokesman for Devon and Somerset Fire and Rescue Service said: "The horse was trapped upside down in an eight foot gully between a bank and a building.
"A neighbouring farmer assisted with the use of a mechanical digger, to dig away the bank. The crews also used strops and lines to release the horse."
She was finally freed just after 2.30pm.