Salif Sane scored the winner for Nancy after Andre Ayew deflected the ball into his own net from a corner in the 75th minute, giving the visitors their first away victory of the season and lifting them to 19th, four points from safety.
The hosts were down to 10 men after controversial Englishman Barton picked up two bookings in four minutes just before the hour to earn his first red card since joining Marseille on loan from Queens Park Rangers.
Marseille produced a dull performance and Nancy could have taken the lead from striker Paul Alo'o Efoulou 14th-minute scissor kick following a corner which was stopped by Andre-Pierre Gignac on the goal line.
Alo'o Efoulou lacked the cutting-edge to convert one of his two clear-cut chances either side of the interval.
Nancy maintained their domination after Barton was dismissed for two rough challenges and deservedly opened the scoring to inflict Marseille's third home loss of the season.
"We could have drawn with a little luck but we did not deserve more than that. Our showing was too poor," Marseille's right-back Rod Fanni told French channel Canal Plus.
"We did not stick to the plan. You can't hope for nothing when you don't do what you have to."
Marseille stayed third on 42 points from 23 games, six behind leaders Paris Saint-Germain and three adrift of Lyon who were stunned 3-1 at lowly Ajaccio thanks to Adrian Mutu's first Ligue 1 double.
The action-packed second half proved to be a nightmare for title-chasing Lyon, for whom Bafetimbi Gomis missed a chance to make it 2-2 from the penalty spot with three minutes to go and centre-back Dejan Lovren was sent off in stoppage time.
Mutu, who put his side ahead with a close-range header in the 65th minute, netted the resulting penalty to seal the home team's victory.
"We can have regrets because we took the lead then we missed a chance to make it 2-2. But we fell asleep," Lyon coach Remi Garde told the club's website.
"We can't control everything. It's very frustrating but football is no science. We just have to go back to work."
Lyon dominated possession for an hour but struggled to threaten goalkeeper Guillermo Ochoa until Alexandre Lacazette, who had a first-half goal disallowed for offside, opened the scoring with a superb volley in the 53rd minute.
Their lead did not last long, however, as Chahir Belghazouani converted Ajaccio's second effort on target four minutes later to make it 1-1.
The Morocco international, who had just returned from Africa Cup of Nations duty, initiated 14th-placed Ajaccio's second goal when he ran down the left wing to set up Johan Cavalli, whose neat cross was headed home by Mutu.
Lyon increased the tempo and thought they would salvage a point in the 87th minute when Gomis was awarded a penalty after Felipe Saad fouled him just inside the box, but Ochoa saved the France striker's effort.
The action was not yet over as Lovren was shown a red card for a foul on Dennis Oliech in stoppage time and Mutu converted the ensuing penalty to score his seventh league goal of the season with Ajaccio recording a first win si
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.