The mid-table visitors shocked the hosts with second-half goals from Sadio Diallo and Floyd Ayite after Nice had been reduced to 10 men in the 58th minute when Paul Baysse was sent off.
The defeat leaves Nice in third place, still level on points with fourth-placed St Etienne, while Bastia's third straight win lifts them further away from the drop zone.
Things looked bright for Nice in the early stages with Alassane Plea bringing a third-minute save out of Bastia goalkeeper Jean-Louis Leca.
Nice came close again after 14 minutes when Jeremy Pied fired high and wide, while it took 23 minutes for Bastia to have their first real chance from Francois Modesto.
The visitors missed a real chance to snatch the lead when Ayite's shot from outside the box was saved by Yoan Cardinale.
Nice ended the first period on top with both Plea and Valere Germain coming close, the latter bringing a good save out of visiting keeper Leca.
A slow second half sprang to life in the 58th minute when Baysse was dismissed for a second bookable offence.
The decision swung the game firmly in Bastia's favour and within three minutes they were ahead when Diallo drilled a free-kick home into the top corner of Cardinale's goal.
Bastia's lead was doubled three minutes later when Ayite fired home from inside the box.
Nice looked to respond but in an increasingly tetchy affair their best chance came in the 76th minute when Germain's long-range effort was easily saved.
Ayite and Seko Fofana both missed chances to heap even more misery on to the home side as Bastia cruised home for an important and impressive win.