Thousands of nurses walked off the job on March 31 to pressure the state government to accept their demands for better pay and mandated nurse-to-patient ratios.
At one Newcastle hospital, striking nurses and midwives amounted to a third of the average staff rostered each day.
Six days before the 24-hour strike, the Industrial Relations Commission ordered the NSW Nurses and Midwives Association to cease organising or encouraging the strike.
But the union emailed members that it was "time to hold strong, continue the fight and attend your rally as planned".
A Facebook post asked viewers: "nurses and midwives will be taking strike action tomorrow ... will you join us?"
The NSW Supreme Court on Wednesday accepted NSW Health's submission that the union acted "in blatant and deliberate defiance" of the commission's orders.
"This conduct was not 'passive' conduct or a 'contravention by omission'," Justice Michael Walton said.
"They were wanton acts by the defendant in disobedience of the order and sanctioned by the Executive of the Association."
No contrition had been shown for the "conscious decision to flagrantly defy" the commission, he said.
However, the conduct was mitigated by the union's prior good behaviour and its giving of notice of the strike to government on March 17.
An effort was also made to ensure life-preserving care could continue and the judge wasn't satisfied any patient was placed at life-threatening risk.
The judge said a fine of $25,000 would deter the union and others like it from further breaches.
He dismissed an argument by NSW Health that the union breached the March order multiple times due to individual branches' defiance, ruling the contravention was a single course of conduct.
The department also failed to prove the union breached a similar no-strike order made in February as the judge found the order was invalid for legal reasons.
That strike, on February 15, was the first time in a decade NSW nurses had walked off the job.