The city Department of Correction vowed to investigate why a visitor was barred from bringing a copy of The Post into a Brooklyn jailhouse on Sunday — and why a sign forbidding New York’s favorite paper was hanging in plain sight a day earlier.

The visitor on Sunday handed over a stack of reading material — including a magazine with a half-naked woman on the cover — to a correction officer at the Brooklyn House of Detention, but only The Post was rejected.

Asked why, the officer said, “I don’t know. It comes from the higher-ups.”

On Saturday, the DOC said it would take down a visitors center sign that said, “New York Post Newspaper is no longer accepted.”

The sign apparently came in response to a Post exposé about how inmates were using makeshift “fishing poles” to retrieve contraband from pals outside.

In an email statement Sunday, a DOC spokesperson said, “No media outlet, including the New York Post, is banned from any of our facilities. No such policy exists and we’re looking into this one egregious case.”