A life derailed can be a life discovered. That’s the uplifting message of Beautiful: The Carole King Musical, which returns to the Academy of Music on its second national tour as part of the Kimmel Center’s Broadway series.

With bittersweet songs like “So Far Away” and “It’s Too Late,” Carole King’s 1971 Grammy-winning album Tapestry became the essential soundtrack for a generation of teenage girls mourning doomed and stillborn romances. Beautiful, which takes its name from another song on the album, is an idealized dramatization of the heartbreak — and musical apprenticeship — that led to King’s singular triumph. A shamelessly entertaining jukebox musical, it traffics in nostalgia and surfs the latest wave of feminist assertiveness.

At its center is Sarah Bockel as an immensely sympathetic King. Bockel sings wonderfully, morphing into the King of Tapestry and imbuing the journey from teenage musical prodigy to brokenhearted wife to pop superstar with emotional power. Douglas McGrath’s efficient book salutes friendship, true love, and the music business without delving too deep, and Marc Bruni (whose 2014 Broadway production is still playing) directs with sparkle and a deft comic touch.

The frame for the show is King’s 1971 Carnegie Hall debut. Then we flash back to 16-year-old Carol Klein, all smarts and ambition, living with her divorced mother (Suzanne Grodner) in Brooklyn. She quickly sells a song to music publisher and producer Don Kirshner (James Clow) and, just as quickly, meets her future husband and songwriting partner, Gerry Goffin (a charismatic Matt Faucher).

In a show with no villains — even the music honchos are nice — Goffin comes close. A gifted lyricist and a charmer, he’s also (naturally) a womanizing louse. But it’s not really his fault, the book suggests: It’s the drugs, his recurrent depression, problems left over from childhood, perhaps the dislocations and temptations of the times. In the end, even he is redeemed.

King and Goffin engage in a friendly competition with another ace songwriting team, the hypochondriac composer Barry Mann (a very funny Jacob Heimer) and the lyricist Cynthia Weil (Alison Whitehurst, peppy and glamorous). When King becomes pregnant, Goffin proposes, elating King. But his restlessness undermines their marriage.

Meanwhile, each team is writing hits, parceled out to groups like the Drifters (Goffin/King’s “Some Kind of Wonderful,” Mann/Weil’s “On Broadway”), the Shirelles (Goffin/King’s “Will You Love Me Tomorrow”) and the Righteous Brothers (Mann/Weil’s “You’ve Lost that Lovin’ Feeling”). Even the Monkees hit the charts with Goffin/King’s “Pleasant Valley Sunday,” inspired by the pair’s move to the suburbs.

In a recurrent conceit, the songwriters start singing — and then, as Derek McLane’s sets and Alejo Vietti’s costumes transform into neon and glitter, the singing groups burst onto the stage, performing Josh Prince’s snappy choreography.

A friend who saw the show with me on Broadway complained that the musical chronology was inaccurate. The rearrangement likely serves to have the songs comment — sometimes subtly, sometimes not — on the action. That works most obviously with “Will You Love Me Tomorrow,” whose Act 2 reprise makes the answer devastatingly clear. Still, in the rainbow world of Beautiful, it’s the enduring gorgeousness of the song that matters more.

Theater

Beautiful: The Carole King Story. Through Jan. 20 at the Academy of Music, 240 S. Broad St. Tickets: $20-$139 Information: 215-893-1999, kimmelcenter.org