"But, meanwhile, you have time to make some small reparation for the injury you have wrought. Are you aware that Mrs. Hilton Cubitt has herself lain under grave suspicion of murder [...]? [....] The least that you owe her is to make it clear to the whole world that she was in no way, directly or indirectly, responsible for his tragic end." (Dancing Men.189)
Justice for Holmes here is a matter of "reparation," or making amends to a wronged person (Dancing Men.189). This is part of a running theme, where justice for Holmes has more to do with personal relationships and opinions than with objective laws.
"So, my dear Watson, there's my report of a failure. And yet - and yet" - he clenched his thin hands in a paroxysm of conviction – "I know it's all wrong. I feel it in my bones. There is something that has not come out [....]" (Norwood Builder.100)
Holmes's personal judgment often comes down to instinct and gut feelings. This shows just how much faith Holmes has in his own judgment; he's willing to trust his instincts over facts.
"I must take the view, your Grace, that when a man embarks upon a crime, he is morally guilty of any other crime which may spring from it."
"Morally, Mr. Holmes. No doubt you are right. But surely not in the eyes of the law." (Priory School.2.52-3)
This is one of the most important thematic statements in the whole book; it helps to draw a distinction between morality and the law. People can be guilty in one, and not in the other. This distinction is central to how Holmes works his cases as well, and his understanding of moral vs. legal guilt impacts his dealings with people and his decisions.
"I suppose that you will admit that the action is morally justifiable, though technically criminal." (Milverton.1.64)
For someone so concerned with facts, it's interesting that Holmes takes a pretty lax view of legal technicalities and instead places a greater emphasis on judging things by his own moral code. Holmes basically makes his moral code into a sort of law.
The high object of our mission, the consciousness that it was unselfish and chivalrous, the villainous character of our opponent, all added to the sporting interest of the adventure. Far from feeling guilty, I rejoiced and exulted in our dangers. (Milverton.1.92)
Watson gets characteristically over-the-top in his language here, especially with his mention of "chivalry." In his romantic style, Watson here echoes Holmes's understanding of morally justifiable, if illegal, acts. It's also interesting that Watson's adrenaline-junkie side appears here. He enjoys "danger," as long as it's for a "noble" purpose.
"I think there are certain crimes which the law cannot touch, and which therefore, to some extent, justify private revenge." (Milverton.2.11)
Though Holmes is a crime-fighter, it's interesting that he doesn't view the law as absolute or binding. Some things, even crimes, exist outside the law. We wonder how Holmes's attitude would be different if he was an actual cop and not a private detective.
"Don't you see any bearing upon the case? Well, well, I don't insist upon it. No doubt I am wrong." (Pince-Nez.92)
The fact that Holmes never forces his judgment and observations onto people gives us some key insight into his character. He likes to prove that he is right rather than force people to acknowledge his points.
"These are my last words," said she; "here is the packet which will save Alexis. I confide it to your honour and to your love of justice. Take it!" (Pince-Nez.169)
Though Anna just met Watson and Holmes, she already pegs them as fans of justice. Perhaps she read their Facebook pages. Watson and Holmes may exude, or suggest, a "love of justice," but Anna may also just be making an automatic connection between detectives and justice here.
"You must look at it this way: what I know is unofficial, what he knows is official. I have the right to private judgment, but he has none." (Abbey Grange.49)
Holmes points out a crucial difference between the official police force and the private detective here. This passage is also a nice example of parallel structure – check out the repeating clauses that Holmes uses.
"See here, Captain Crocker, we'll do this in due form of law. You are the prisoner. Watson, you are a British jury, and I never met a man who was more eminently fitted to represent one. I am the judge." (Abbey Grange.167)
In a major scene, Holmes actually plays judge and Watson plays jury for a man; they declare him "not guilty." The roles Holmes and Watson adopt here also tell us a lot about their characters. Holmes is the guy in charge and Watson is a sort of representative of the "everyman."