Elisabeth Vincentelli

Elisabeth Vincentelli

Neil Patrick Harris works his tail off onstage in ‘Hedwig’

Sometimes you wonder if there’s anything Neil Patrick Harris can’t do: He switches from “How I Met Your Mother” to singing Sondheim on Broadway, directing a magic show to hosting any award ceremony you throw at him.

And he makes it all look easy.

Except, that is, Broadway’s “Hedwig and the Angry Inch,” in which he’s working very hard — and not just because he’s onstage the entire show performing all of the songs. The strain we see is that of a show-tune guy trying on rock ’n’ roll for size. That music’s fury and danger don’t come naturally to Harris, who fares a lot better in the show’s more emotional scenes.

“Hedwig” is a tricky animal: Framed like a concert, it requires a charismatic lead who can go wild during the most raucous numbers, but also handle long, narrative banter between the songs — and the occasional audience interaction.

John Cameron Mitchell basically wrote the role for himself and played it for most of the 1998 show’s off-Broadway run. Now “Hedwig” returns on its biggest stage ever, with the same catchy glam-rock score by Stephen Trask and a slightly updated story.

Neil Patrick Harris as Hedwig.Joan Marcus

And what a story it is.

Born male in the former East Berlin, little Hansel undergoes a sex change to join his GI boyfriend in America. But the operation’s botched, and the rechristened Hedwig — left with an “angry inch” of flesh between her legs — winds up in a Midwest trailer park, “divorced, penniless, a woman.”

Hedwig’s also a singer, and she and her husband, Yitzhak (the excellent Lena Hall), are approaching the big time — a one-night-only gig replacing Broadway’s “Hurt Locker: The Musical,” which closed the night before, “at intermission.”

It’s a funny, effective conceit that underlines Hedwig’s also-ran status — especially compared to her former protégé (and love), Tommy Gnosis. Tommy’s fame has now far eclipsed hers, and he happens to be playing in Times Square at the same time.

At least Hedwig doesn’t have to worry about her own show’s production values, which are quite high. Tim O’Heir’s sound design is very loud but crisp, and director Michael Mayer makes great use of projections. He pulled off a similar approach in “American Idiot.”

That said, the success or failure of this “Hedwig” rests on Harris.

In cutoff denim shorts, teetering platforms and gigantic blond hair, he relentlessly prowls the stage, occasionally lunging into the audience for a lap dance or two. But it all feels a little too rehearsed, and Harris doesn’t look entirely comfortable clambering over the bombed-out set.

Only when he finally clicks with the material — as on the heartbreaking “Wig in a Box,” about the process of becoming someone else — is the show suddenly worth the effort he’s poured into it.