Playing a teenage girl living a double life as a famous pop star on "Hannah Montana" left Miley Cyrus with an identity crisis in real life, the "Midnight Sky" singer revealed.

The 28-year-old told Spotify's "Rock This with Allison Hagendorf" podcast that the premise of the Disney Channel show messed with her sense of self.

"The concept of the show is that when you're this character, when you have this alter ego, you're valuable. You've got millions of fans, you're the biggest star in the world," Miley explained. "Then the concept was that when I looked like myself, when I didn't have the wig on anymore, no one cared about me. I wasn't a star anymore."

"That was drilled into my head [that], without being Hannah Montana, no one cares about you ... I really had to break that," she continued.

PHOTO: Billy Ray Cyrus, left, and Miley Cyrus in a scene from "Hannah Montana."
Ron Tom/Walt Disney Television via Getty Images, FILE
Billy Ray Cyrus, left, and Miley Cyrus in a scene from "Hannah Montana."

Cyrus said she went through an "identity crisis" in the years after the show and often played into people's ideas about her.

"I never created a character where it wasn't me, but I was aware of how people saw me and I kind of played into it a little bit," she said, referencing her "Bangerz" era. "Like, when I noticed that people gave a s--- that I would stick my tongue out, when they told me, 'Stop sticking your f------ tongue out,' I would do it more ... When people are pissed, that means they care, so that makes you want to do it, too."

Cyrus said 2013's "Miley Cyrus & Her Dead Petz" was the album where she really began to find herself and that she considers it her favorite work to date.

"Hannah Montana" aired on the Disney Channel for four seasons, from 2006 until 2011.

It spawned a concert film, 2008's "Hannah Montana and Miley Cyrus: Best of Both Worlds Concert," and a feature film, 2009's "Hannah Montana: The Movie."