Miley Cyrus can laugh about her past.

The pop star famously got her start on the hit Disney Channel show "Hannah Montana," then she broke free from her good girl image by undergoing a massive change in 2013 with the release of her album "Bangerz." In a speech she gave at an event last night, she joked that that wild period of her life was a "malfunction."

Cyrus appeared at D23, a weekend-long event hosted by Disney for its fans. At the end of the weekend, a ceremony was held naming 14 new Disney Legends – people who have worked with the company and made a notable impact.

MILEY CYRUS RELATES TO DOLLY PARTON'S STANCE ON NEVER HAVING CHILDREN

A split image of Miley Cyrus now and in 2013, twerking on Robin Thicke

Miley Cyrus joked about a "malfunction" she experienced beginning in 2013. (Arturo Holmes/Getty Images; Jeff Kravitz/FilmMagic for MTV)

Stars like Jamie Lee Curtis, Angela Bassett and Kelly Ripa were honored.

For her speech, Cyrus got off to an emotional start, saying, "I’m gonna let everybody get in on a little Disney Legend secret. I’m the one that tells you what you’re not supposed to know. And what I want to say, is that legends get scared, too. I’m scared right now, but the difference is we do it anyway, and all of you can do that every single day. It’s legendary to be afraid and do it anyway. There is no such thing as failure when you try."

She went on to talk about her early years and how she auditioned for "Hannah Montana" in 2005 at Disney's Burbank office – a place where she joked "it's rumored that they create all of us Disney kids."

Miley Cyrus as Hannah Montana

Miley Cyrus starred as Miley Stewart on Disney Channel's "Hannah Montana." (DISNEY CHANNEL/BOB D'AMICO)

She continued the joke by saying, "I definitely wasn’t created in a lab, but if I was, there must’ve been a bug in the system which caused me to malfunction somewhere between the years of 2013 and '16."

The audience laughed and applauded, and she added, "Sorry, Mickey!"

"Hannah Montana" premiered in 2005, when Cyrus was 13. Its last episode aired in January 2011, and two years later, the singer began promoting a new album called "Bangerz."

"A little bit of everything has changed since that day, but at the same time, nothing has changed at all. I stand here still proud to have been Hannah Montana because she made Miley in so many ways."

— Miley Cyrus

She memorably performed at the MTV Video Music Awards that year with Robin Thicke. The performance featured her dancing provocatively, rubbing against Thicke and touching herself.

Miley Cyrus, Robin Thicke

Miley Cyrus gave a widely criticized performance with Robin Thicke at the 2013 MTV Video Music Awards, with the former Disney star wearing flesh-toned underwear and not much else. (Theo Wargo/WireImage)

Cyrus concluded her speech by saying she was proud of her role on "Hannah Montana." She tearfully continued with, "A little bit of everything has changed since that day, but at the same time, nothing has changed at all. I stand here still proud to have been Hannah Montana because she made Miley in so many ways."

LIKE WHAT YOU’RE READING? CLICK HERE FOR MORE ENTERTAINMENT NEWS

The "Flowers" singer was not the only honoree to tear up. Harrison Ford was also named a legend during the ceremony, and he became emotional during his speech as well.

Harrison Ford wears a tux on the red carpet at Cannes Film Festival.

Harrison Ford was named a Disney Legend at D23. (Laurent KOFFEL)

The actor began tearing up before he even began speaking, as the audience cheered him on while he approached the stage. He took a moment to seemingly gather himself, and at that time, someone shouted "I love you." He responded, "I love you, too."

"I love the life you’ve given me," he continued. "I love the people that I’ve had the opportunity to work with. Nobody does anything in this business for long. We work in collaboration, no matter who we are and what we’re doing."

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

He called himself an "assistant storyteller," and told the audience, "The stories are for you, about you. About us, our common humanity. And to be able to work in that area is a privilege."

harrison ford 1923

Harrison Ford said that he is "grateful" to be an actor. (ROBYN BECK/AFP)

Ford also took a moment to talk about Disney CEO Bob Iger and the impact he has had on not only the company, but on his own life. He called Iger a "dear and trusted friend," with his voice breaking on the last word.

The "Indiana Jones" star finished by saying he was "very honored" to be in the company of his fellow honorees. "I'm really delighted and a little bit embarrassed by this, but I'm so very grateful."

CLICK TO GET THE FOX NEWS APP