The first time Jack Antonoff hit it big — more than a decade after he began touring as a teenager in crowded vans that often arrived at empty rooms — he walked away.

The band Fun. had started as a side project for Mr. Antonoff, a chronic multitasker. But by 2012, after placements in “Glee” and a Super Bowl ad sent the group’s song “We Are Young” into the stratosphere, Mr. Antonoff found himself experiencing “truly inhumane, goofy, ‘Almost Famous’-level” success, he recalled. Suddenly a platinum-selling act, Fun. toured arenas around the world and won Grammys for song of the year and best new artist. Then the band declined to make another album.

“I remember immediately — immediately — feeling like, ‘I don’t want to play “We Are Young” when I’m 35,’” Mr. Antonoff said. “‘I don’t want to be defined by this.’”

But his aversion wasn’t to stardom, or even the burden of a megahit, which he still openly chases as a go-to producer and songwriter for those on the pop A-list, like Lorde and Taylor Swift. The problem was that Fun. was merely something Mr. Antonoff was a part of, he explained recently at his home studio in Brooklyn; he needed the music he made to be a part of him.