Bill Clinton is going to be endorsing embattled Harlem Rep. Charles Rangel’s re-election to a 23rd term, The Post has learned.

The former president’s endorsement is a coup for Rangel, 83, who is facing a strong challenge from state Sen. Adriano Espaillat, the same candidate who nearly toppled him in their initial face-off two years ago.

Harlem preacher Michael Walrond is also in the race.

Clinton stayed neutral when Rangel was running in 2012 because a former aide to his foundation, Clyde Williams, was one Rangel’s challengers. But Clinton has no conflict this time.

Two sources told The Post that Clinton will go all out for Rangel.

“Clinton is going to go big for Charlie. Expect fund-raising solicitations and robo-calls to voters,” a political insider said.

Rangel is close to both Bill and Hillary Clinton.

It was Rangel who propelled Hillary Clinton’s political career, helping her to get elected senator in New York.

And Bill Clinton opened up his foundation office in Rangel’s Harlem base after leaving the Oval Office.

Rangel also vehemently defended Clinton during the ex-president’s impeachment proceedings.

Clinton returned the favor — strongly backing Rangel’s re-election in 2010 when the incumbent was under fire for House ethics-rules violations that later led to a congressional censure.

Rangel, in turn, supported Hillary Clinton’s campaign for president over Barack Obama.

Obama is expected to remain neutral in the June 24 Democratic primary.

Bill Clinton even put a plug for Rangel in his 2006 autobiography.

“He is a unique public servant whose leadership was critical to many of my administration’s successes,” Clinton said.

The Rangel campaign declined comment on when Clinton will officially endorse the congressman.

But team Rangel must be hoping that Clinton’s firepower will help counter defections of prominent New York politicians who backed Espaillat — including City Council Speaker Melissa Mark-Viverito and Bronx Borough President Ruben Diaz Jr.

Rangel’s redrawn 13th Congressional District takes in parts of The Bronx as well as northern Manhattan.