Death doesn’t necessarily disqualify you from voting in New York City.

Investigators posing as dead voters were allowed to cast ballots for this year’s primary and general elections, thanks to antiquated Board of Election registration records and lax oversight by poll workers, authorities said.

The election board’s susceptibility to voter fraud by people impersonating the departed was uncovered during a massive probe of the agency by the Department of Investigation.

The probe uncovered 63 instances when voters’ names should have been stricken from the rolls, but weren’t — even though some of them had died years before.

“The majority of those 63 individuals remained on the rolls nearly two years — and some as long as four years — since a death, felony conviction, or move outside of New York City,” said DOI Commissioner Rose Gill Hearn.

Undercover DOI agents were able to access voting booths in 61 instances — including 39 dead people, 14 jail birds and eight non-residents. Only twice were the agents blocked.

It was easy to scam the system because poll workers did not closely check birth dates or signatures of the ineligible voters. In all cases, probers voted for a fictitious “John Test’’ instead of a real candidate.

In some cases, young investigators were able to vote under the name of a dead person three times their age.

For example, a 24-year female was able to access the ballot at a Manhattan poll site in November under the name of a deceased female who was born in 1923 and died in April 25, 2012 — and would have been 89 on Election Day.

Also at a Manhattan poll site, a 33-year-male investigator was able to vote under the name of a deceased man who would have been 94 on Election Day.

DOI said the agents cast votes for fictitious candidates so as to not affect any races.

Board of Elections lawyer Steven Richman said the agency is sometimes unaware that a voter has died because it never received notification. “The information is only as good as the information we receive,” he said.

Richman said the elections board is supposed to receive copies of death certificates from the state Board of Elections via the health department. There isn’t a notification requirement if someone dies in another state, he said.