It is a fact that N'Zoth knew Azshara plotted behind his back as he tells the player character in his fight:
Azshara was foolish, how could she possibly think that she could deceive an Old God? Is she stupid? The Old Gods are more ancient than Azshara's entire species. They are biologically smarter than Azshara, of course she's not going to outsmart the Old GOd.
Azshara was arrogant, she revealed her intentions to N'Zoth during their first meeting, when she made it clear that she would not be submissive. That's all N'Zoth needed to understand Azshara would never truly be loyal, and so it was child's play to expose her treachery. Had Azshara been smarter, she would have submitted herself to N'Zoth, to reduce the chances of being exposed. Azshara was short-sighted, a smarter character would have feigned servitude, Azshara never did. First of all, she made it clear to N'Zoth that she wanted to rule his empire. Then, She kept taunting and mocking him with a smug face even in the 8.2 trailer; but by the end of that patch, N'Zoth made her drop her smug really quickly:
People here who think Azshara will be successful are not paying attention. Azshara and Denathrius are funny, but they are destined to lose. Denathrius failed everything, he lost everything.
1) He lost his realm.
2) He lost his body.
3) He was humiliated and mocked.
4) His allies in the Maw did not give a shit about rescuing him and considered him a mere pawn.
Denathrius lost everything, Azshara will lose everything too, if she continues to play with powers she does not understand.