Nick Jonas was only 9 and portraying a teacup on Broadway when he first heard about a buzzy new musical playing way downtown.

“All my adult castmates were talking about how great the show was and how amazing the music was,” Jonas recalls of his days in “Beauty and the Beast.” “I went to the record store with my dad and picked up a copy of the cast recording and really fell in love with it.”

What he adored was “The Last Five Years,” a two- person stage show with a cult-like following that he is now leading onto a Broadway stage for the first time, capping a 24-year journey.

“In a time where musicals are based off of movies, are based off records or coming from London, this is a great American piece by an American composer, writer, songwriter,” says its Tony-nominated director Whitney White. “This is kind of one of our great American masterpieces.”

Jonas co-stars with Tony winner Adrienne Warren in the heartbreaking look at a five-year relationship between aspiring novelist Jamie and budding actor Cathy from both points of view.

Her musical arc traces their relationship backward, from their parting to their meeting five years earlier. Jamie’s arc moves in the opposite direction, beginning with his excitement at encountering the woman of his dreams, moving forward in time to the unraveling of their marriage.

“I think everyone can relate to falling in love, meeting someone, that relationship evolving to something else,” Warren says. “There’s marriage involved, and there’s breakup and heartbreak. I think we all have experienced one of those things in our lifetimes, if you’re lucky enough.”

Composer and writer Jason Robert Brown’s show debuted in Illinois in 2001 and arrived off-Broadway the next year. It has become a staple in regional theaters and colleges, and was made into a 2014 movie starring Anna Kendrick and Jeremy Jordan.

“I think the brilliant thing about the writing is that it really makes you ask a lot of questions about yourself,” Jonas says. “And I certainly kind of looked inward as I’ve been digging into this work.”

The marriage of Jamie and Cathy comes under stress when his career starts taking off and hers does not, exploring how imbalances can test a relationship. “I will not fail so that you can be comfortable, Cathy. I will not lose because you can’t win,” he tells her.

“There was something about the way this crystallizes what it is to be a young artist in this business, or really to be a young artist in any business,” Brown says. “I think that’s sort of what the show is about, and I think it’s why young artists connect to it as much as they do.”

Warren, who won a Tony playing Tina Turner, learned about “The Last Five Years” while studying musical theater at Marymount Manhattan College in New York City.

“I always heard my fellow students singing it in class, and so I became a fan of the music from afar,” she says. “I always thought it was an interesting piece. I just never thought it was something that I could ever perform or be a part of.”

White, Jonas and Warren each insist they don’t want the audience to side with one or the other partner onstage. They want them to invest in the couple.

“I have been Jamie in relationships, and I have been Cathy, so I can’t judge either of them. I’ve been both of them at different times in my life,” White says. “I love both of these characters so equally that I’m just trying to love on them at every beat in the story and not judge them. I feel very nonjudgmental about this portrait of failure.”

To make the leap to a larger stage at the Hudson Theatre, Brown has given the show a bigger sound and has updated some of the references, moving it to modern day. In some productions, the two lovers only interact once, but this new one has them reach out a lot even though they are in different timelines.

Brown says seeing it on Broadway — now starring a huge pop star beside a theater powerhouse in the recently opened production — is a little surreal.

“I’ve never had ambitions for this piece to be a Broadway musical. It was always this little weird, intimate show,” he says. “I’m very protective of my little show. And at the same time, I have to let it go do its thing in the world.”