An emotional Foxx took centre stage on Monday to accept the Vanguard Award from the Critics Choice Association's Celebration of Cinema & Television: Honoring Black, Latino and AAPI Achievement in Los Angeles.
"I saw the tunnel. I didn't see the light," he said during his acceptance speech, noting that his medical condition was life-threatening.
He did not disclose the nature of his illness, but said that six months ago he was unable to walk.
The star became said he wouldn't wish what he went through on his worst enemy.
"Because it's tough when it's almost over," he said.
He thanked everyone for their prayers and gave special recognition to his sister and his daughter, Corinne Foxx, for "not letting anyone know what happened'.
"I can only say that you need somebody like that in your corner," he said.
Well-known names, including actor Kerry Washington, basketball star LeBron James and others posted tributes to Foxx following his time in hospital.
In May, he posted an Instagram video sharing that he was out of the Atlanta hospital and recovering.
Foxx, 55, is known for films such as Collateral, Django Unchained and the biopic Ray.