Singer-songwriter Maggie Rogers grew up on Maryland’s Eastern Shore before dazzling Pharrell Williams in music school at New York University. (Capitol Records)

It’s not entirely unheard of for artists to try to distance themselves from a song that brought them overnight success early in their career. But that’s generally a later career development, when a radical shift in musical styles is taking place or when a band — like, say, Hanson — decides to grow up and get “serious.”

To be keeping a certain song at arm’s length when you haven’t even released an official full-length album is pretty unusual. But that’s where Maggie Rogers, a 22-year-old singer and songwriter who grew up on Maryland’s Eastern Shore, seems to be right now, seeking to establish an identity and musical direction that won’t immediately make listeners think of her breakthrough moment.

In Rogers’s case, that breakthrough was “Alaska,” a song she sang to Pharrell Williams while she was enrolled at New York University, studying in the Clive Davis Institute of Recorded Music. The song, prepared as a homework assignment to be eventually played for Williams so he could offer advice, triggered a stunned reaction from Williams. It was captured on a video whose play count is now in the multimillions — and the song catapulted Rogers from unknown to next big thing.

Since that time, she earned her degree, signed a record deal, made her national television debut and toured the world. And has seemingly answered so many questions about the Pharrell moment that you couldn’t blame her for wanting to distance herself from it.

Against that backdrop, Rogers glided onto the stage in front of a sold-out crowd at U Street Music Hall on Saturday night. There was a homecoming feel among the mixture of friends, family and fans who sent up a rousing welcome, to which Rogers responded with a pulsating performance that cast her as an artist with both a remarkable voice and a serious vision.

The nearly hour-long set used the sound she achieved on “Now That the Light Is Fading,” an EP released in February, as its template.

Songs such as “Dog Years” and “On + Off” rode a sweeping electronic pulse, at times resembling the airy musical settings Solange achieved on her recent recordings.

But Rogers, who plays guitar, piano, harp and banjo, has folk roots as well. (The self-released “Blood Ballet” wanders through Carole King and Joan Baez territory.) Those poked through here and there, lending an appealing, homegrown edge to her electro-pop.

And whether it was the near-ambient “Color Song” or her big hit — which she used to bring the show to a climax — Rogers sang with an assurance that many artists twice her age haven’t achieved.

“Basically, I play music to make me feel better,” she said at one point. Here’s hoping she’s able to abide by that simple mantra.