The case went before the court in Massachusetts early Tuesday morning where Hernandez's team argued that the conviction cannot stand because he had not exhausted all of his appeals before his death. The doctrine is called abatement ab initio.
Prosecutors argued against it -- claiming Hernandez knew about the rule and used it as a loophole in a diabolical plot to get millions of dollars from the Patriots for his family.
The evidence, prosecutors claim, was spelled out in his suicide note to his fiancee, Shayanna Jenkins ... in which he told her, "You're rich!"
Prosecutors say Hernandez knew if his conviction was erased the Patriots would have to pay out the remainder of his NFL contract ... estimated to be worth around $6 million.
Prosecutors claimed he shouldn't be rewarded for cutting his own appeal short by committing suicide -- but ultimately the judge didn't see it their way ... and cleared the conviction.
Odin Lloyd's family was in the courtroom when the judge announced her decision. They were visibly upset and left the courtroom in a rush.