Cosgrove's first television appearance (aside from commercials) was in 2001 as the voice of 5-year-old Lana Lang in the pilot episode of Smallville. Cosgrove then made her film debut with the 2003 film School of Rock. In the movie, she played Summer Hathaway, a young girl with great ambition and discipline who finds herself adjusting to the free-spirited nature of the new Teacher by becoming band manager of the classroom's rock band. School of Rock was both a box office hit, grossing over $131,282,949 worldwide, and critical success, receiving a 91 percent score on Rotten Tomatoes. Cosgrove's acting on the film was praised, with David Ansen of Newsweek describing it as "spot on". She said of the experience of working with Jack Black: "The first week it was like, 'Oh, my God, that's Jack Black,' but two weeks later it was fine. He's really funny. Sometimes the Director would say, 'Jack, you can't make them laugh so much.'" She cited the scene of trying to sing badly as very difficult. Cosgrove stated that "I got a 45-minute lesson from Jim O'Rourke of Sonic Youth on how to sing badly. I've been taking singing lessons for about five years, so getting to sing badly was new. The Director kept saying, 'Try to sing even worse, Miranda,' so it was weird."
In 2004 Cosgrove soon landed her first major role in a television series when she was awarded a main role in the Nickelodeon series Drake & Josh, alongside Drake Bell and Josh Peck. In the series, she portrayed Megan Parker, the mischievous younger sister of the title characters. Also in 2004, Cosgrove guest-starred in a special episode of the animated series What's New, Scooby-Doo?, as well as guest-starring in a season five episode of Grounded For Life, portraying the character of Jessica. In 2005, Cosgrove was awarded the role of 'Munch' in the Cartoon Network film Here Comes Peter Cottontail: The Movie. In the film, Cosgrove portrays a female mouse who is rescued from a hawk by Junior and Flutter, and subsequently comes along for the adventure that the characters must take. Cosgrove also guest-starred on two episodes of the animated comedy, Lilo & Stitch: The Series. The television series, which aired on Disney, is a spin-off of the original film, Lilo & Stitch. Cosgrove was also rewarded her second major role in a theatrical film, when she cast alongside Drake & Josh co-star Drake Bell in the comedy film Yours, Mine and Ours, in which she portrayed the character Joni; the film performed mildly at the box office. Yours, Mine and Ours opened at number three, with an opening weekend of $17,461,108 in the US. Cosgrove later starred in her third theatrical release, Keeping Up with the Steins, which was released to generally negative reviews from critics. The film was also a failure at the box office.
She also earned a role in the straight-to-DVD film The Wild Stallion and appearing in several Nickelodeon television series. The first of these appearances was in Zoey 101. Cosgrove later guest starred on an episode of Unfabulous, which starred Emma Roberts. In the episode, Cosgrove guest starred as a sweet girl named Cosmina. However, Cosgrove was already in the works of starring in her own sitcom, titled iCarly, released on September 8, 2007. Schneider tailored iCarly around the interest young people have in the internet. A unique part of this show is the fact that viewers may submit their own videos and also be included in the show. Cosgrove said of the audience participation aspect, "When I first heard about the idea, I thought it was so cool. If I were home and watching TV, I'd want to send in a video." By the summer of 2008, the show was the third highest rated in the 9–14 demographic. The "iCarly Saves TV" special extended episode, became the most-viewed entertainment show on cable TV in June 2008. The Drake & Josh final episode was aired on September 16, 2007. Cosgrove's debut as a recording Artist began with the iCarly theme song "Leave It All to Me",. features Drake Bell and released as a single on December 2, 2007. In June 2008, Columbia Records released the iCarly Soundtrack, which featured four songs performed by Cosgrove, that debuted at number one on the Billboard Kid Albums chart. The following single "Stay My Baby" failed to reach the charts, but the third release, "About You Now", reached number 47 on the Hot 100.
In music, Cosgrove debuted with iCarly (2008), a Soundtrack album for the series in which she performs four songs. In 2009, she released her debut extended play, About You Now. Cosgrove's debut studio album, Sparks Fly, was released in April 2010, followed by her second extended play, High Maintenance, the following year. The EP's lead single, "Dancing Crazy", written by Avril Lavigne, debuted at number 40 on the US Billboard Adult Pop Songs and peaked at number 100 on the Billboard Hot 100.
In December 2008, a cover of the holiday song "Christmas Wrapping" was released to promote the hour-long special Merry Christmas, Drake & Josh. On February 3, 2009, Cosgrove released her first solo recording, the extended play About You Now with five songs. To promote the 2009 animated film Cloudy with a Chance of Meatballs, Columbia Records released a single entitled "Raining Sunshine" with an accompanying music video in August 2009. Cosgrove became one of MTV's Female Pop Rookies of 2009. In 2010 Cosgrove worked with songwriters The Matrix, Dr. Luke, Max Martin, Leah Haywood, and Daniel James, for her debut studio album. She said that "most of the songs are fun, pop, rock-girl empowerment". The first single from her album, "Kissin' U", was premiered on Ryan Seacrest's radio show on March 12, 2010. The album, titled Sparks Fly, was released in April 2010, and peaked at number 8 on the US Billboard 200 chart. She signed with skin care and cosmetics company Neutrogena on February 12, 2010, as an ambassador. On March 17, 2010, it was reported that Cosgrove had signed a deal, reportedly in the "low- to mid-seven-figure range" to do 26 additional episodes of iCarly. Also in 2010 Cosgrove voiced Margo in Universal Studios' 3-D computer animated feature Despicable Me, released in July 2010.
Cosgrove is an only child and was homeschooled from sixth grade onwards. In 2011, she was accepted at New York University and the University of Southern California (USC). From 2008 to 2010, she dated the actor James Maslow. She ultimately started attending USC in fall of 2012, to be able to continue acting and to stay near her family. She has cited her aspirations of majoring in theater or writing.
On February 15, 2013, it was announced that Cosgrove would be starring in Girlfriend in a Coma, a television series written by Liz Brixius for NBC, an adaption of Canadian novel with the same name. Cosgrove was scheduled to play as Evie, the daughter of the mother Karen, who wakes up after a nearly twenty-year-long coma and finds out she has a daughter; On March 19, 2013, it was announced that Christina Ricci left the cast and the project had several problems. The project was later cancelled. Cosgrove again voiced Margo in Despicable Me 2, released on June 5. In 2013, she appeared in the animated short films Training Wheels as Margo and Gru's Girls as Savana. In December, she announced on the Today Show that she was recording a new album. In 2014 Cosgrove performed voice work in the animated film A Mouse Tale, which was released on February 10, 2015. Cosgrove also starred in the horror film The Intruders with Austin Butler, portraying the role of Rose.
In May 2015, Cosgrove was cast in the NBC comedy pilot Crowded, created by Suzanne Martin with executive Producer Sean Hayes. Cosgrove played Shea, an Astrophysics PhD graduate from MIT, who does not know what to do in post-college life, and so decides with her sister to move home to find out, driving her parents crazy. The series debuted on March 15, 2016, but was cancelled after one season. In March 2017, Cosgrove was cast in the NBC comedy pilot Spaced Out from creators Adam Sztykiel and Bill Lawrence. However, it was not ordered to series.