The striker, whose strong form in the last two seasons at the Allianz Riviera has seen him return to the Italy team, has scored 43 goals for the club.
Nice have got off to a slow start this year under new coach Patrick Vieira, with the former Arsenal and France midfielder seeing his charges lose at home to Reims and draw at Caen.
But the decision of the 28-year-old Balotelli to stay will be a massive boost to Vieira and his team.
"After careful consideration, Mario Balotelli has decided to stay at OGC Nice," the club said in a statement.
"The Italian international expressed his wishes to the directors. There will be a third season for the forward. The agreement was signed by all parties on Monday evening."
Balotelli had also been linked with a possible move to Serie A, with Roma and Napoli reportedly interested, but it was Marseille and the Stade Velodrome where he was expected to arrive before the end of the month.
Nice were quick to poke fun at their near neighbours' failure to land the enigmatic former Manchester City, Inter Milan, Liverpool and AC Milan forward.
"Made slightly complicated at the start of the summer by another club from the south of France, the situation is now back to normal," said Nice.
"Simple, clear. Like one of SuperMario's strikes."