Barton was dismissed for the ninth time in his career when he aimed a low blow at Tom Huddlestone as players clashed following a foul by QPR debutant Darnell Furlong.
It was a dereliction of duty from the midfielder and with his side already a goal down to Nikica Jelavic’s volley, it should have spelled the end of the strugglers’ chances.
But Charlie Austin glanced home Matt Phillips sumptuous cross in the 39th minute and that appeared to be enough for a hard-fought draw until N’Doye celebrated his 30th birthday with a close-range header in the 89th minute.
Austin had marked his equaliser by hobbling away and clutching his knee - a none-too-subtle jibe referencing the failed medical that cost him a move to the KC Stadium in 2013.
Manager Steve Bruce admitted on the eve of the match that he had missed out on a gem in the former Burnley striker, but with deadline-day signing N’Doye scoring for the second game in a row, he at least has a new match-winner to toast.
The result sees Hull record back-to-back league wins for the first time in 17 months, while QPR suffered a major setback in their own relegation battle.
Hull misplaced a series of passes in the opening minutes, Paul McShane setting the tone by hoofing a cross-field ball into touch after a matter of seconds.
But the hosts quickly settled and began dictating the tempo, Ahmed Elmohamady threatening on the right and Huddlestone enjoying space at the base of the midfield.
Jelavic had a couple of half-chances as he looked for space behind the Rangers defence and broke the deadlock after 16 minutes.
Huddlestone fired a free-kick into the penalty area and when Steven Caulker’s tame header dropped for Jelavic, he buried it in the bottom corner with a clinical volley.
It was his 12th goal for the club, making him Hull’s top Premier League goalscorer, ahead of the club’s former Brazilian forward Geovanni.
QPR went close to an instant reply, Barton crossing for Furlong whose looping header had Allan McGregor scrambling at the far post.
There were further chances at both ends, Jake Livermore drilling over after a neat touch from Jelavic and Phillips causing panic with a curling cross into Hull’s six-yard box.
Then came the sending-off.
Furlong was culpable for setting events in motion, leaving his foot in on Jelavic, but Barton can only blame himself for what came next.
As the players came together he pushed Alex Bruce and when Huddlestone moved towards him he lashed out inexplicably.
His dismissal almost cost QPR immediately as Jelavic nodded a fraction wide, but instead the 10 men drew level inside six minutes.
A fluid passing move ended with another superb cross from Phillips, with Austin flashing his header across McGregor and in at the far post.
His celebration quickly turned into a tongue-in-cheek pop at Hull’s medical staff.
The sides went in at 1-1 and manager Bruce waited just eight minutes after the restart to make an attacking change, defender Alex Bruce making way for Gaston Ramirez.
It was increasingly tough going for the home side though, QPR committing numbers in defence and packing the final third.
Hull were trying to build patiently, but after 66 minutes Tigers boss Bruce made a second aggressive switch - removing Livermore and bringing on £10million striker Abel Hernandez.
When Austin left the field with 15 minutes to go, he was treated to a mild chorus of boos but the home fans were half-hearted in their catcalls and quickly resumed pleading for a winner.
Hull had no shortage of possession but could not seem to fashion anything to test Rob Green, surprisingly underworked in the away goal.
N’Doye thought his chance to win it had gone when his point-blank effort was beaten out by Green but the ball was still alive.
Brady returned it to the danger area and this time N’Doye made no mistake as he powered a header into the net.