The NHL’s problem child franchise in Phoenix is about to change hands again, The Post has learned.

Andrew Barroway, who attempted to buy the Devils two years ago and believed he had an agreement to buy the Islanders earlier this year before Charles Wang switched course and instead reached a deal with Jonathan Ledecky, is in advanced negotiations to purchase 51 percent of the rebranded Arizona Coyotes, according to informed sources.

The sale of the troubled franchise, which has been in financial distress even prior to moving from downtown Phoenix to Glendale in 2003-04 after previously relocating from Winnipeg for the 1996-97 season, is expected to be completed within the month.

As part of the deal, Barroway would agree to drop his $10 million lawsuit against Wang in which he alleges that the Islanders’ owner reneged on an agreement to sell him the Brooklyn-bound franchise.

NHL deputy commissioner Bill Daly declined comment when contacted by The Post. Barroway did not respond to email requests, and a Barroway associate also declined comment when reached by phone.

IceArizona — under the Renaissance Sports and Entertainment umbrella — has owned the Coyotes for one season after purchasing the franchise last year from the NHL, which had owned and operated the franchise since it plunged into bankruptcy in 2009. The group would maintain a 49 percent interest in the franchise under this purchase agreement with Barroway.

RSE, which feted itself in an on-ice ceremony at last season’s opener, agreed to buy the franchise after striking a deal on a lease for the arena in Glendale that contains an out-clause after five years (following 2017-18) if losses total $50 million during that term. The Post has been told that the franchise is claiming losses of $24 million for last season alone.

A separate source told The Post the NHL has been seeking investors for the franchise over at least the last few weeks.

Sources further report Barroway, a Philadelphia-based hedge fund manager, is buying 51 percent based on a recent $305 million valuation of the franchise, which was purchased by RSE for a reported $170 million. The NHL had paid $140 million to get the team out of bankruptcy.

— Additional reporting by Josh Kosman