Sparks was approached to write both the film's screenplay and the novel. Sparks completed the screenplay in January 2009, prior to the completion of the novel, making The Last Song his first script to be optioned for film. The setting, originally in North Carolina like the novel, moved to Georgia after the states had campaigned for months to host production. Upon beginning production in Tybee Island, Georgia and nearby Savannah, The Last Song became the first movie to be both shot and set in Tybee Island. Filming lasted from June 15 to August 18, 2009 with much of it occurring on the island's beach and pier. The Last Song was originally scheduled for wide release on January 8, 2010,but was postponed to March 31, 2010.
At seventeen, Veronica "Ronnie" Miller (Miley Cyrus) remains as rebellious as she was the day her parents divorced and her father moved to North Carolina three years prior. Once a classical piano child prodigy under the tutelage of her father, Steve Miller (Greg Kinnear), Ronnie now ignores the instrument and has not spoken with her father since he left. While Juilliard School has been interested in her since she was young, Ronnie refuses to attend.
Now, Steve has the chance to reconnect with his estranged daughter when her mother, Kim Miller (Kelly Preston) sends the rebellious teen and her younger brother, Jonah (Bobby Coleman), to spend the summer with him. Steve, a former Juilliard School professor and concert pianist, lives a quiet life in Wrightsville Beach, the small beach town in North Carolina where he grew up, working on a stained glass window for the local church to replace the one the church lost in a fire. According to the locals, it was Steve who had (accidentally) set fire to the church one night.
After arrival, Ronnie becomes miserable, defiant, and defensive toward all those around her, including handsome, popular Will Blakelee (Liam Hemsworth) whose introduction involved crashing into her during a volleyball match, and accidentally spilling Ronnie's strawberry shake on her. She shrugs him off and meets Blaze, an outcast who lives with her boyfriend Marcus. While at a beach campfire, Marcus hits on Ronnie and Blaze mistakes this for Ronnie flirting with him. Angered by this, Blaze later frames Ronnie for shoplifting, causing her arrest. Later on, Ronnie discovers aLoggerhead Sea Turtle nest at the beach by her house and while protecting it, she meets Will again on his volunteer work for the aquarium. After a night of staying up to defend the turtle eggs from predators with Will, she discovers he is deeper than she believed, and begins to develop feelings for him.
As Ronnie falls in love with Will, she also manages to form a better and stronger bond with her father. As their relationship deepens, Will invites her to his sister's wedding. When Ronnie goes to buy a dress for the wedding, she sees Blaze crying over Marcus kicking her out of his car. She approaches Blaze sitting on the road and gives her the money meant for the dress. Her brother ends up giving her money for a dress so she can look nice for Will. At the wedding, Marcus comes and causes a scene with Blaze and Will ends up hitting him after he harass Blaze and Ronnie. Later that day, the turtle eggs hatch and her father collapses. Ronnie immediately has Steve rushed to a hospital and learns that he has stomach cancer that has spread to his lungs. She decides to start spending more time with her father since he is unlikely to survive much longer. Around the same time, Ronnie and Will get into an argument after Will confesses that Scott, his best friend, had actually set fire to the church. She is outraged that he let everyone believe that her father was the culprit. With Will soon leaving for college, there is no time to patch things up.
Fall arrives and Jonah returns to New York for the school year, but Ronnie stays behind to take care of her father. Leading a slow life, she tries to make up for the time with her father that she's lost. She continues work on a composition he's been writing (titled "For Ronnie"), after he loses the steadiness of his hands due to his illness. He dies just as she finishes it.
At his funeral she stands to make a speech but declares that no words would ever be able to show how wonderful her father really was. Instead, she decides to share with them the song she helped finish. Before she sits down to play, sunlight shines through the stained glass window, making her smile, knowing that her father is with her.
Blaze and other townsfolk offer Ronnie sympathy and kind words after the funeral outside. Later on, while talking to the attendants, she runs into Will. He says that he liked the song she played and that he knows her dad did too and Ronnie thanks him for coming. Having decided to attend Juilliard, Ronnie is packing up to return to New York when she sees Will standing outside. She goes outside to see him and Will apologizes to her for everything that had happened and Ronnie forgives him. Will surprises Ronnie by revealing that he will be transferring to Columbia in order to be with her and they share a kiss.
The end credits show Ronnie driving away in her car and smiling to herself.
- Miley Cyrus as Veronica "Ronnie" L. Miller, an angry, rebellious seventeen-year-old forced to spend a summer with her estranged father. She later falls in love with Will
- Greg Kinnear as Steve Miller, Ronnie and Jonah's father and former Juilliard School professor and concert pianist who moved to Georgia after his divorce. During the summer, Steve reconnects with Ronnie through their mutual love of music. With Jonah's help, Steve also works to reconstruct the centerpiece of the local church, a stained glass window, after the original was destroyed in a fire. He later dies of cancer.
- Kelly Preston as Kim Miller, Ronnie and Jonah's mother who raised her children in New York City after her divorce. a popular and skilled beach volleyball player, Will aspires to attend a top university and volunteers at the Georgia Aquarium. He is Ronnie's love interest.
- Bobby Coleman as Jonah Miller, Ronnie's younger brother sent along with his elder sister to Tybee Island.
- Nick Lashaway as Marcus, Blaze's abusive boyfriend who breaks up with her because he wants Ronnie which lead him and Will to fight at Megan's wedding party and the leader of a gang of thugs who hustle money from beach carnival crowds through spectacular fire juggling performances.
- Carly Chaikin as Blaze, a rebel who befriends Ronnie when she is sent to Georgia. Blaze betrays Ronnie when she frames Ronnie for shoplifting a watch, but they eventually became friends again.
- Adam Barnett as Teddy, a young thug adept at hacky sack and juggling, skills he uses as part of Marcus' crew to hustle money.
- Nick Searcy as Tom Blakelee, Will's father.
- Melissa Ordway as Ashley, Will's snobby ex-girlfriend.
- Carrie Malabre as Cassie, Ashley's best friend who aids Ashley in antagonizing Ronnie.
- Rhoda Griffis as a Doctor
- Lance E. Nichols as Pastor Charlie Harris, the kind, devout Pastor of the local church. He was Steve's first piano teacher, parental figure, and best friend while Steve was growing up.
- Hallock Beals as Scott, Will's best friend who ends up creating trouble between Will and Ronnie.
- Stephanie Leigh Schlund as Megan Blakelee,Will's elder sister who is engaged to be married.