The Princess and the Goblin is a fantasy book by George MacDonald
The story takes place in a magical kingdom where a little princess, Irene, has been sent to live with a nanny because of the ill health of her mother. The large house where Irene spends her days is part fortress and part farmhouse, and is situated half way up a tall mountain in a mining region.
Once upon a time the region was inhabited by a nation of miners. Oppressed by heavy taxes and abusive nobles, the people sought refuge in their mines and eventually adapted to their dark environment. In time the mutated into hideous goblins, and their existence became the stuff of legends and whispers.
Although hideously deformed, the goblins are cunning and intelligent. They have built an extremely intricate system of tunnels connected by galleries, underground passages, and waterways which honeycomb the entire mountain.
The goblins hate the surface dwellers, blaming them for their circumstances. So goblins never pass up an opportunity to harass and harm the people on the surface, and have a special hatred for the human miners who descend into their realm.
One rainy day, the little princess is bored and so she begins to explore the large and dusty rooms of her new home. Without realizing it the princess enters a labyrinth of hallways and rooms, all abandoned and dusty. In one she finds a beautiful old lady sitting at a loom (reminding one of the Greek Fates and the destiny that they spun for men). The old lady reveals that she is the princess's great grandmother and that she has the same name as Irene. She shows Irene that she lives by eating pigeon eggs gathered from the roof and tells the princess that it is her task to watch over Irene.
Later Irene returns to the normal part of the house and tells the nanny of her adventures, but she is not believed. Irene tries to find her great grandmother again but cannot find the secret part of the house again.
She and her nanny go out for a walk, but they stay out too late and it becomes dark. The goblins are repulsed by light but come out at night and they begin to chase the princess and her nanny. The pair are saved by Curdie, a slightly older boy. Curdie is a miner and knows the ways of the goblins. He chases them off by singing, as the goblins also are repelled by beautiful sounds.
Curdie escorts the princess home and from then on they become friends, embarking on a series of adventures. It is hinted that the two might become more than friends when they become older.
Exploring the caverns and mines, the two discover that the goblins have devised a diabolical plan to drown the human village by diverting the underground rivers. Aided by Curdies' courage and a magical ring given to the princess by her magical grandmother, the two foil the goblins plot who are drowned instead.
A sequel to the book called The Princess and Curdie, recorded the further adventures of the pair. The book was later made into a ballet and into a movie. The movie was not successful.