The girl, Kaelyn Kerr, of Billerica, Mass., was on her way to a hair salon with her mother, Kristin Kerr, and baby brother when the elevator jammed.
"I went to go push the door and nothing happened," Kristin Kerr told MyFoxBoston.com. "So that's when I was pushing the buttons and nothing happened."
Once firefighters arrived, they determined the only way to free the family was for them to climb a ladder out of the top of the elevator car and over a wall.
"When they put the ladder down that's when she kind of started freaking out a little bit," Kristin Kerr said, describing Kaelyn's fear.
Firefighter John Keough started talking to Kaelyn to calm her down and discovered her favorite movie was Frozen. Keough's partner, firefighter Scott Myette, pulled the song Let it Go up on his phone and the started sing along.
"It worked," said Keough. "We got her to a point where she was comfortable with us and up the ladder we went, right up and over, no problem."
Both firefighters said they have young children at home.
"You say, okay how would my kids be comforted in this situation, so anything we can do to make them more comfortable makes our job a lot easier," Myette said.
Notable deaths of 2014 [PHOTOS]