This idiom usually means doing something that you know isn't a very good idea, or something like that.
For example, I might say, "against my better judgement, I'm going to give you one last chance", when I know you're going to let me down again but my emotions get the better of my rationality. My "better judgement" in this case is the wisdom that it's a bad idea to give the person another chance, but I'm going against it and doing so anyway.
It's a slightly stilted / stuffy thing to say. A more relaxed way to say the same thing would be "I know I shouldn't, but..."
Does this make sense?