The two pillars of giant evil threats from which pretty much any evil (outside of normal humanoid psychology) in the Warcraft universe can be traced back to never seem to cooperate.
The Burning Legion is made up of Demons from the Twisting Nether - many of which are former mortal races that were corrupted with Fel magic. It's led by the Dark Titan Sargeras, who was once good, but decided that the universe was chaotic and evil by its nature, and sought to hasten the inevitable return to that state by unleashing the demons he had once fought upon it.
The Old Gods are strange, alien creatures of immense size and incomprehensible minds and natures. The Old Gods revel in chaos, and they corrupt or create minions to engage in constant madness and violence seemingly to entertain themselves.
The Old Gods were chained beneath the surface of Azeroth long ago by the Titans, and they seek to escape to re-take the world and possibly move on to others. Meanwhile, the Burning Legion wishes to utterly destroy the world, leaving it a shattered black cinder that perhaps still glows with a few green embers.
Both of these guys would leave Azeroth a lifeless cinder, but the main distinction is that the Legion wants to invade while the Old Gods want to escape.
Plus, I would bet that the Old Gods are on the Legion's target list for things to burn away into nothingness. I really can't say what the Old Gods have in store for the Legion should they win, but it really doesn't seem like either has much love for the other.
And that makes the cases of Azshara and Xavius rather interesting.
Azshara of course allied with the Burning Legion during the War of the Ancients (though her people didn't know that - there were Night Elves attacking the demons with the battlecry of "For Azshara!") She sought power and flattery, and in Sargeras she saw, finally, a worthy consort. But it's not clear that she ever really bought into the ideology of the Legion. She was happy to sweep away the "lesser" races of Azeroth, but only if it meant she would have complete control over what was left.
When the Well collapsed and the Sundering happened, Azshara sank beneath the waves, but she was transformed by the Old Gods, along with her followers (well, some of them - see below,) into the Naga.
The Naga have certainly worked with the Old Gods, such as in Vashj'ir, but we don't really know if it's an alliance or total domination by said eldrtich creepy crawlies. We've barely seen Azshara in-game - she appears in Darkshore for a brief moment using the Lady Vashj model (something I'm certain we'll see updated when she comes to greater prominence,) and seems to be helping Twilight's Hammer.
But when the Legion comes calling, will she abandon the Old Gods? Or what?
Xavius was Azshara's most trusted advisor, and it was he who first really made contact with the Legion. Sargeras eventually transformed him from a Night Elf into the first of the Satyr. It's actually quite likely that, had the Legion prevailed in the War of the Ancients, we'd basically see the Satyr as the remnant of the Night Elves in the same way that the Man'ari Eredar are most of what's left of the Eredar (and maybe Tyrande and Velen would lead two groups of "exiled ones.")
Xavius was killed not once, but twice by Malfurion, and he was consumed by a magical tree. But when Fandral Staghelm tried to grow a new World Tree to re-gain immortality, Xavius tricked him into incorporating a part of his essence within this new Teldrassil, which cursed the tree and prevented it from doing what it was meant to.
It was actually only recently that Xavius became known as the Nightmare Lord, and attempted to break down the barrier between the Emerald Dream and the real world (perhaps a bit like how Deathwing wanted to break down the barriers between the real world and the Elemental Planes.)
But it sounds like Xavius did not create the Emerald Nightmare. All the hints we've gotten point to N'zoth as the true corrupter of the Emerald Dream (my pet theory has always been that the Reorigination Device in Uldum uses the Emerald Dream as its backup copy, and that if they had succeeded in activating it, the corruption of N'zoth would have been part of what it would over-write in Azeroth.)
Xavius, having spent time in the Nightmare and being so closely tied to it, is probably inundated with Old God corruption. Now granted, this may be a nail in the coffin of my "Fel magic kills Old Gods" theory, or perhaps Xavius is usurping N'zoth's corruption to serve the Legion.
The big question here, I think, is who is the better chess player? What are the Old Gods doing while the Legion invades? I think that if the Legion were to succeed in taking Azeroth, the Old Gods are likely to die. If the Titans could use the Mogu to kill Y'shaarj, and we mere mortals (somewhat accidentally) managed to purge even the Sha, I can't imagine the Legion is going to have all that hard a time doing the same with what's left of Yogg-Saron and C'thun and N'zoth (and any other as-yet-unnamed Old Gods.)
But maybe the Old Gods have a plan. The Legion's victory could mean a little window of opportunity when Titan prisons are cracked open, but the world is still intact enough for them to escape.
Or maybe Sargeras has an even bigger plan. Sargeras unleashed the demons from Mar'duun (if that name is unfamiliar, it's because we only learned about it with Legion's announcement) to serve the purpose of spreading death and destruction through the cosmos. For all we know, their nature as Demons is not so important as much as their natural inclinations toward chaos.
And you know what are way more powerful than any known demon (possibly even counting Sargeras - though we don't know that he's really become a demon himself,) and totally has an appetite for chaos, and took far more effort to lock up than the demons that make up the Burning Legion? The Old Gods.
Sargeras has been obsessed with taking Azeroth for thousands of years. We've always assumed this was because of the Well of Eternity or a Titan waiting to be born. But maybe the answer has been staring us in the face with a giant freaking eye, or a bunch of eyes that are really mouths, or whatever N'zoth and Y'shaarj have/had for eyes.