Nicki Minaj is coming to the rescue of a Miami nightclub -- saving a New Year's Eve event by replacing Jennifer Lopez and doing it for significantly less dough.

We're told E11even nightclub acted swiftly after J Lo bailed on the gig that would have scored her a million dollar payday. It's unclear how much Nicki's getting, but our sources say the club scored a bargain.

Nicki was pretty hands-on for the event -- she wanted to approve all pics used to promote the event.

E11even's hooking her up with a pink Barbie hat for the gig and MYX fusions moscato to quench her thirst. We're told DJ Irie will be her special guest.

It's interesting ... Meek Mill will also be in the area. As we reported ... he scored a six figure gig at Dream Nightclub.