Per the articles I linked in posts 5 and 23, he did inform his superiors, and wrote and sent the letter only after he came to believe they were not going go take action.
His firing, per some career uniforms, by civilian, political appointee leadership, is unusual, and undercuts the chain of command.
It is clear to me that Crozier knew what he was doing and knew the likely consequences to his career. He chose his sailors over his chain of command, after his chain of command did not work, in his judgement, to his sailors benefit. It must have been a very hard decision for him.
I think all we can ask of leaders, military or civilian, is that they do their best to do the right thing, regardless of the hits to their careers, popularity, or livelihoods. I believe that is what Crozier did.