Sources close to the situation tell us ... lawyers for the 2 camps were close to reaching a deal -- one meeting away, in fact -- when Wayne publicly dissed Birdman by changing the lyrics in "I'm Me" from a Cash Money shout-out to a Jay Z shout-out.
We're told Birdman has his own beef with Jay, which made Wayne's diss sting even more.
Lil Wayne's "Suck my d***!" at that same show didn't help either -- so he pulled the plug on negotiations.
The bottom line, we're told, is if they're ever gonna settle the $51 million lawsuit ... both sides need to stop jawing in public.