Neil Patrick Harris had a profane message for a besotted fan who disrupted his Broadway show “Hedwig and the Angry Inch.”

Mid-performance, a female fan yelled out, “I love you, Neil!” Harris — who plays a transgender East German punk — yelled back, without missing a beat, in character, “I’m doing something up here, ­motherf–ker!”

The Post’s Barbara Hoffman ­reports it was met with rapturous applause.

In the show, Hedwig makes the front page of The Post, which is blown up as a giant prop.