Spoilers for 13 Reasons Why Season 4, Episodes 1-10. After four seasons, 13 Reasons Why has come to a close. The show began with the tragic suicide of Hannah Baker, and ended with one final gut-wrenching goodbye. Justin's fate on 13 Reasons Why was a devastating end to one of this series' most beloved characters.
The season started with the Liberty High families attending a funeral. And in the show's finale, we finally discover who that funeral was for: Justin Foley. After admitting to Clay's parents that he needed rehab at the end of Season 3, Justin's life seemed like it was coming together. He arrived home from rehab in Season 4 with a positive, almost zen-like attitude, and seemed to be looking forward to working and graduating. But during the season he slipped back into his old ways. Seeing his ex-girlfriend Jessica with her new beau Diego chipped away at him, and learning of the death of his mother sent him in a tailspin. After relapsing, Justin managed to clean himself up for prom — showing up mid-dance and confessing his love to Jessica — but the dance ended in tragedy. Justin collapsed at the prom, and was taken to the hospital.
Through a conversation with a doctor, it's revealed that Justin contracted HIV-1 likely due to his time abusing substances and engaging in sex work. The doctor notes that the virus was likely dormant in his body for a while, and because Justin never consented to being tested for it, the virus advanced into AIDS.
Justin's condition worsens rapidly while in the hospital, and he's eventually put on a ventilator due to a brain and lung infection. When it's clear Justin is not going to recover, they remove him from the ventilator to say their goodbyes.
He has an emotional send-off with Jessica, who tells him that he was the love of her life. "You taught me what love is," she says, as the two hold each other and sob. As the night goes on, the waiting room fills with Alex, Tyler, Tony, Charlie, the football team, and assorted classmates who want to pay their respects. It's a simple, moving way of showing how tragedy broke apart the school in Season 1, but it brings them back together again in the finale. In the end, Justin quietly passes away with Clay holding his hand, while Clay's parents look on.
Clay struggles to find the words, so Alex and Zach both speak at Justin's funeral. Alex admits that while he and Justin didn't always get along, in the end he believes that Justin saved his life. Zach says that the pain they feel is a reminder to be better everyday. After everyone files out, Clay and Jessica sit in the empty church and hold hands while they stare at Justin's casket.
After graduation, Clay cleans out Justin's locker and discovers his college essay. In the final moments of the show, Justin manifests in a ghostly form and encourages Clay to read the essay. In it, Justin talks about how Clay was the primary positive influence in his life, and he saw him as his true brother. It's through this interaction that Clay finds the closure he needs, and he decides to continue working with his therapist to heal.
Justin's death is a heart-wrenching twist for a tragedy-filled show, but his passing inspires Clay and the rest of his friends to live for the future, just as Justin would have wanted them to.