Di Maria took his tally for the season to seven with a well-taken brace, and although Ignatius Ganago halved the deficit for Nice, a double dismissal ended their hopes of a comeback.
The visitors went on the attack from the off and Nice keeper Walter Benitez had to make saves from Presnel Kimpembe and Abdou Diallo in the opening three minutes.
Icardi and Ander Herrera also went close from corners before the breakthrough arrived after a quarter of an hour, Icardi teeing up Di Maria who buried his shot into the bottom corner.
Ganago had a chance to equalise for Nice but he fired his shot wide, and moments later they were two behind thanks to a piece of magic from Di Maria.
The Argentinian raced onto Thomas Meunier's ball over the top and, from a tight angle, executed a sublime chip over Benitez.
On the hunt for a first-half hat-trick, Di Maria fired an ambitious effort high and wide before Benitez saved from Kimpembe.
Thiago Silva headed over shortly before half-time, but he did not emerge after the break due to an injury with Marquinhos coming on.
The one-way traffic looked set to continue in the second half with Icardi heading over and Marquinhos planting Di Maria's cross against the crossbar.
But against the run of play Ganago capitalised on sloppy defending to rifle Nice back into it via the underside of the crossbar.
However, Nice's comeback stalled within the space of three minutes, when first Wylan Cyprien was shown a second yellow card.
Then Christophe Herelle clashed with Leandro Paredes and earned a straight red card, leaving Nice to play the final 13 minutes with nine men.
Mbappe marked his return from a hamstring injury with the third and Icardi completed the scoring at the death.