Most Nickelodeon fans know Miranda Cosgrove from her hit show 'iCarly.' Not only was the show Miranda's most popular work, but it also earned her a ton of cash. But that wasn't the only gig the then-tween nabbed.

When 'Despicable Me' came out in 2010, fans of Miranda's TV show were thrilled to hear the actress voice Margo, the oldest of Gru's three daughters. But how did Cosgrove make the jump from Nickelodeon tween sitcom star to esteemed voice actress?

How Did Miranda Cosgrove Get Her Role In 'Despicable Me'?

As it turns out, Miranda has 'iCarly' to thank for a lot of her career success. After she impressed Nick executives as Megan on 'Drake & Josh,' she earned her own show (and an opportunity to sing, too), so that was the first major turning point.

RELATED: How 'Nickelodeon's' Miranda Cosgrove Made Her $10 Million Net Worth

But after 'iCarly,' everyone wanted to pitch Cosgrove for roles. Including the kids of some important decision-makers in the studio.

In an interview back in 2010, Miranda spilled all the details about how she was cast in 'Despicable Me,' and the fact is, she didn't even have to work at it.

Miranda Was Hand-Picked For The Role Of Margo

The way Miranda told the story, she showed up at the audition for 'Despicable Me' with fairly low expectations. But as it turned out, one of the casting directors had a daughter who was right at the sweet spot for the 'iCarly' target audience.

The casting director had heard Miranda's voice on TV by way of her daughter, and one of the kids told their mom who Cosgrove was at some point. The young star admitted "they'd had lots of people come in to read for" the part, so she knew the opportunity was something special.

Miranda Was Already A Teen When She Voiced Margo

When Miranda started voicing Margo, she was already 17. She laughed in 2010 interviews that casting directors said she sounded like she was 11 or 12, but it fit the character perfectly.

Still, it was Cosgrove's first time working on a "big animated film," and the experience wasn't easy. She knew there were big names attached to the film and was excited to work with them -- but then, she realized she'd be recording her lines all alone in a studio.

That didn't deter her though; Miranda stuck with 'Despicable Me' sequels one and two, the latter of which came out in 2017. That meant the voice of a young teen Margo was performed by a 24-year-old.

What Is Miranda Cosgrove Doing Now?

Though her name came into the media when the Dan Schneider scandal erupted, Miranda has kept pretty quiet. And though she's had quite the career, her tendency to stay out of the spotlight probably helped her stay out of the headlines despite the drama.

And while she won't be voicing a character in the next installment of 'Despicable Me,' Miranda's still staying plenty busy.

NEXT: Miranda Cosgrove Stopped Acting For College, But What Has She Been Up To Lately?