Chuck is right. That's the fundamental darkness to the show. Jimmy DOES lie and cheat and swindle in his practices, and even this disproving of Chuck was more evidence of that. Jimmy is a genius, but at the same time, a bit of a crook, and Chuck can see that, and it's why he hates him, because to Chuck the law is sacred.
Jimmy had to crush his brother in court using any and every trick he could, to save himself and shake Chuck from standing in his way any more. Because Chuck, even more so than Kim, is the only one who really sees through him for what he is. Crushing Chuck is the first dark disingenuous step to becoming Saul, even if sanctimonious spiteful Chuck has a come up uppance due.
The fact that Jimmy is incredible at this is fantastic to watch, and the fact Chuck does have a mental illness do not detract from that.
I love Jimmy and I'm rooting for him, but he is an anti hero just like Walter White, except even more stealthily..