Joe Biden’s corrupt dealings in Ukraine and those of his son must be investigated, and the time has come for him to drop out of the presidential race.

While Biden served as vice president, his son Hunter was unaccountably making $50,000 a month “consulting” in an industry with which he was totally unfamiliar ­(energy), in a notoriously graft-prone country where he didn’t speak the language (Ukraine). Hunter made similarly sketchy deals with China.

President Trump’s phone call this summer with his Ukrainian counterpart may have been ill-advised, but it simply didn’t rise to an impeachable offense. Meanwhile, the American people deserve to know the truth about the Biden family’s lucrative dealings with other countries during the Obama ­administration.

Indeed, in 2016, Biden oversaw a seriously salacious project in Ukraine that included attempting to get the nation to fire its top prosecutor. One of his tactics included clearly and explicitly threatening to withhold at least $1 billion in American aid if the Ukrainians didn’t follow through with the Obama administration’s demands. Soon ­after this tangible threat, the prosecutor was fired.

Biden later bragged: “I looked at them and said, ‘I’m leaving in six hours. If the prosecutor is not fired, you’re not getting the money.’ ”

What much of the mainstream media seems to ignore is that, while the prosecutor may have been a shady character, he was in the process of investigating Burisma Holdings, the largest gas company in Ukraine. Burisma just happened to be paying Hunter that eye-watering salary as a board member.

Conveniently, Burisma awarded this cushy post to Hunter Biden weeks after the Obama administration announced that his father would be its point man in Ukraine. Other than his last name and connection to his old man, what, exactly, did Hunter offer Burisma? And even if firing the Ukrainian prosecutor was warranted, how did the appearance of impropriety and conflict of interest escape Joe Biden?

The media would like to obfuscate this ­awful fact pattern by focusing solely on Trump’s call, which included no explicit quid pro quo and which ultimately left unaffected the state of US aid to Ukraine.

Meanwhile, liberal mainstream outlets are all but wholly ignoring many facts that had already been reported about Hunter Biden in the weeks and even months before Trump’s phone call became public.

A former senior Obama White House aide told The New Yorker in July that “Hunter was on the loose, potentially undermining his father’s message.” The staffer went so far as to suggest that Hunter Biden did not fully comprehend that many of his foreign business partners were only motivated to work with him because they wanted to say “that they are affiliated with Biden.”

The Obama administration was supposed to be ultra-scrupulous, remember? As this same aide argued, even “the appearance of a conflict of interest is good enough, at this level of politics, to keep you from doing things like that.” Yet Hunter Biden continued, unencumbered, to cavort with his international business partners and get paid handsomely for it.

All told, it has been reported, Hunter ­Biden made upwards of $3 million doing consulting work in industries and countries with which he had no experience.

Surely smart Democrats understand how badly all this could damage his father’s presidential aspirations. President Trump will likely frame the entire 2020 campaign as the story of the Biden family’s oily foreign connections. Judged against Hunter Biden’s ­unseemly, nepotistic wheeling and dealing, his father’s uplifting campaign slogans can only ring hollow.

Trump could even marshal the words of Viktor Shokin, the fired Ukrainian prosecutor, who testified under oath that “I was forced out because I was leading a wide-ranging corruption probe into Burisma Holdings, a natural gas firm active in Ukraine, and Joe Biden’s son Hunter Biden was a member of the board of directors.”

Biden, in other words, represents a massive liability for the Democrats in 2020. Already, he is slipping in the polls behind the radical Sen. Liz Warren. If Democrats are to have a reasonable shot at choosing an electable moderate as their nominee, Biden must step aside to make room for someone who isn’t nearly as tainted by corruption. Who could that be? Amy Klobuchar? New York’s own Gov. Andrew Cuomo? That remains to be seen.

What’s clear is that while the mainstream media has concocted a consistent narrative claiming that Biden’s son did nothing wrong, there is simply too much evidence for a thorough investigation not to be conducted — during which Joe Biden will be forced out of the race. Better for the ­ex-veep to do the prudent and politically expedient thing now rather than have a choice imposed on him later.

Andrew Stein is a former president of the New York City Council.