When the book begins, young Miri is miffed that her father won't let her go to work in the quarry with him and her older sister Marda—once again, she's left out and expected to take care of the chores at home and barter with the trade.
The trumpets sound from the village and Miri—along with her best friend and secret crush, Peder—runs over to see what's going on. They find out that the high priests of Danland have declared that the next princess will come from Mount Eskel (their territory), and that all girls ages twelve to seventeen are required to attend a princess academy for the next year so that they can learn fine manners and be ready for the prince's selection in a year's time.
Miri doesn't want to go but soldiers come and take all the girls away—except for Marda, because she's older than the prince. When they arrive at the academy up in the mountains, they find that their teacher is a stern woman named Tutor Olana who doesn't put up with any of their shenanigans and locks them into closets when they misbehave.
At first, Miri keeps getting into trouble for talking back, even costing the other girls a visit home when she talks back to Tutor Olana (which makes everyone hate her). The only person who seems willing to talk to Miri is Britta, a girl who just moved to Mount Eskel from the lowlands (after her parents died) and is shunned by the other girls because they assume that she thinks she's better than them.
After some time though, Miri starts to excel at her lessons. She finds that she loves to read and spends all of her free time in the classroom going through Tutor Olana's books and reading about the history of Danland. She also starts to figure out how to use quarry-speech—the way that villagers communicate with each other silently when they're working in the quarries.
She often hears the other girls—especially an older girl named Katar—talking about how annoying she is, but Miri ignores them and continues to excel in her lessons. When it comes time for spring holiday, Tutor Olana springs an exam on the girls and says that only the girls who pass will be able to go home. Miri and Katar pass, but Miri thinks that it's unfair for the other girls to have to stay behind, so she uses quarry-speech to tell them all to run, and they scamper back to the village even though Tutor Olana protests.
On the walk home, Miri makes amends with some of the other girls from the village and they walk home together, excited about all the festivities. She sees Peder and they talk for a while. He admits to her that he wants to carve pretty pictures into the linder stone, and she tells him that she's been working on quarry-speech. She's able to use it to communicate with him, and he tells her that she's his best friend. Aw.
Miri also tells everyone that she's learned something by reading about Commerce: it turns out that the traders have been cheating the villagers this whole time. Linder is a lot more valuable than they've let on, and she convinces the villagers to ask for more money the next time the traders come up.
She goes home and spends some time with Marda and her father before she has to head back to school. The girls are nervous but decide that they can use their Diplomacy skills to reason with Tutor Olana, so when they return Miri represents the girls and tells Tutor Olana that they want to go home on rest days, dismiss the soldiers from the academy, and help their families when the traders come. In return, whoever is chosen as the next princess will make sure that Tutor Olana is rewarded with good work in the capital. Impressed by all that they have learned, Tutor Olana agrees to their terms.
The next time the traders come, the girls head home to oversee the trading, and to everyone's relief, the traders give the villagers more money for their linder. Miri witnesses a quarry accident that her sister Marda is in. Marda has a hurt leg, and Doter—Peder and Esa's mom—pulls Miri aside to explain why her father won't let her into the quarry: her mom died from injuries from working in the quarry, and Miri looks just like her. Her father can't bear to let her go into the quarry for fear that she'll be hurt. Miri spends her time at home looking after Marda.
After Miri returns to the academy with the other girls, the prince and his convoy finally arrive in preparation for the big ball. Tutor Olana gives the girls a test in order to decide who will get to go to the ball, and by giving each other the answers through quarry-speech, all the girls pass and Miri is named academy princess. This means she gets to wear the fanciest dress. Poor Britta becomes sick and can't go to the ball like everyone else.
At the ball, Miri dances the first dance with Prince Steffan, who seems distant and uninterested in all the girls—he asks her to take a walk with him, but remains hard to reach. She finally calls him out on his behavior and he admits that he's overwhelmed by how many girls there are to choose from.
They talk for a while and Prince Steffan tells Miri that she was his favorite person to talk to out of all the girls. The next day, though, the girls are rudely surprised when they discover that the prince has already left without making a decision—and because winter is coming, he won't be back until the spring to make his choice.
Miri goes outside to think and sees Peder, who has come to see if the prince made his choice. When she tells him he hasn't, he assumes that she's disappointed and walks away. Miri suddenly gets a message through quarry-speech that tells her to run, and she starts to sprint in hope of catching up to Peder. A man grabs her though and takes her back to the academy, where she sees they've been captured by bandits looking to trade the future princess for a ransom.
The bandits don't believe the girls when they say that the prince hasn't chosen a bride yet, and say that they're setting off with all the girls the following day. Overnight, though, it starts to storm, so the bandits and the girls are stuck at the academy.
Miri tries to engineer an escape using quarry-speech to tell the other girls to run, but it doesn't work, so then she uses quarry-speech to try to reach Peder and tell him that they're in danger. In the middle of the night, he responds to her and lets her know that all the villagers are outside. She wakes the other girls and they climb out the window, with the bandits in hot pursuit. Some of the girls make it to the villagers, but Miri is caught by Dan, the leader of the bandits.
With Peder's help, Miri inches Dan toward the edge of the cliff and then stabs him in the wrist so that he falls over the edge. Afterward, the villagers take everyone—all the girls, Tutor Olana, and Knut the academy handyman—back to the village for the winter. In the village, Miri starts to teach her sister and others how to read, and Tutor Olana eventually resumes classes that are open to anyone who wishes to come.
Finally the snow melts and it is announced that the prince has returned to the academy to make his selection. All of the girls trek up to the academy again in order to meet him—but before they go in, Britta panics and runs outside. When Miri follows her, she confesses that she knows Prince Steffan and isn't an orphan after all; her father sent her up to Mount Eskel so that she could have a chance to be the next princess.
They go back inside and Prince Steffan immediately relaxes when he sees Britta, who he's in love with; he asks for her hand in marriage and they are officially betrothed. Afterward, Mount Eskel is declared an official province of Danland. Britta asks Miri if she'll come to Asland and serve as the chief delegate, but Miri tells her to ask Katar instead.
When Miri goes outside, she sees that Peder is waiting to walk her home. He says that he's glad that she wasn't chosen to be princess, and she says she is too. They share their dreams for the future—he wants to carve linder stone, and she wants to open a school for Mount Eskel. As they come down the mountain, they hold hands. This is a happy ending indeed.