Aaron Hernandez killed himself largely because he was suffering from CTE -- and NOT because he was agonizing over his sexuality ... so says his famous attorney.
Jose Baez -- who repped Aaron and helped him beat a double murder case -- tells TMZ ... the new documentary about his client implies Aaron was in the closet, and might have even taken his life because of that alleged secret.
That's just not the case, though, according to Baez ... who says Aaron's death was triggered by advanced CTE -- a brain disease the tight end had developed since his youth. Baez insists Aaron's sexual orientation played ZERO part in his fate.
You'll recall ... Baez was intent on getting Aaron's brain studied at Boston University, and even accused the Worcester Medical Examiner of holding onto it illegally. He also downplayed rumors his client had a love affair with a fellow inmate.
Of course ... the new Netflix doc, "Killer Inside: The Mind of Aaron Hernandez," focuses heavily on Aaron allegedly being gay, and being tormented about it. His old high school quarterback, Dennis SanSoucie, claims they used to hook up as teens.
The fact SanSoucie made it into the doc pisses off Baez ... who tells us he only agreed to speak on camera if 'Killer Inside' producers promised to NOT interview certain people about Aaron's sexuality.
He didn't mention SanSoucie by name, but Baez made it clear he feels double-crossed by producers. Worth noting ... SanSoucie was the only person who appeared on camera making the gay allegation.
Baez blasted the entire Netflix production ... referring to it as a "money making scheme" that was severely lacking when it comes to quality information.