Jay-Z won’t be making a marquee appearance at the Ed Sullivan Theater after all.

The city suddenly yanked approval for the mega-rapper’s planned concert Monday atop the Midtown marquee for the “Late Show with David Letterman,’’ sources said.

“The mayor’s office approved it, and then just like that, it got denied,” one police source told The Post yesterday.

Reps for Jay-Z, Letterman, the city and the NYPD had planned to meet at the “Late Show” offices yesterday to work out concert details.

But the meeting was abruptly canceled — and everyone involved was told that the event was now a no-go, sources said.

The police source speculated: “It’s because of the holiday weekend. They were concerned about fireworks and terrorism.”

Another source suggested that the music gig was cancelled for the same reason given the last time Jay-Z and Letterman tried to plan the event in 2010 but were thwarted.

Details about the performance were leaked to The Post beforehand, creating a logistical nightmare for cops given the hordes of fans such an event would draw.

The mayor’s office refused to comment, as did Letterman’s people. Jay-Z’s rep didn’t respond to phone and e-mail messages.