(CNN) -- In 1969, William Shatner thought his iconic show's run was over.
"I finished 'Star Trek' late one night and everybody said goodbye and off I went, saying, 'That's the end of that show.' It was just a good show and that was the end of it."
Little did he know that the fans had other ideas; they wouldn't let the show fade into obscurity. "Star Trek" conventions began in earnest.
As the years went by, Shatner wondered what motivated these fans to go to conventions year after year, so he embarked on a sociological, anthropological study of "Star Trek" fandom that became a book and then a film called "Get a Life!" The works are based on a famous "Saturday Night Live" sketch in which Shatner went off on a tirade against "Star Trek" fans. The documentary is set to premiere on Epix on July 28.
"People come to these things and they dress up and it seems comical and superficial: a nice day out on the town," he told CNN Geek Out. "But then we discover that it's more than that, and to many of the people it has a deeper meaning."
Shatner was struck by several of the fans he encountered: "For a kid who is pathologically shy, dressing a cat up in a uniform -- [suddenly] he could speak. 'Captain Dave,' who is dying from Lou Gehrig's disease, lives through 'Star Trek.' There He had his tube in a wheelchair, striving to live, and then he would go home and rest for months. For 'Captain Dave,' that's life -- to hold on and desperately experience life."
Shatner learned a lot from the experience, he said.
"No matter how prosaic something is that you've done and been a part of again and again, there is so much more there that you haven't seen," he said. "A tree you pass by every day is just a tree. If you are to closely examine what a tree has and the life a tree has, even the smallest thing can withstand a curiosity, and you can examine whole worlds."
The attitude exemplified in that famous 1980s SNL sketch still exists today, Shatner said.
"These people who come to Comic-Con and dress up - all across the country, the rest of the population who doesn't understand are scoffing at them," he said. "When you come to San Diego and see the joy and the pleasure that all these people are getting -- as you see in the documentary, and they're participating in something far deeper -- they don't even know that. It's illuminating. You have to take the people who come to Comic-Con and the Trekkers or Trekkies seriously. There's something serious going on that my documentary discovers."
The people Shatner interviewed for his book and documentary were surprised that he was just as interested to see them as they were to see him. Originally, he wanted to do his research anonymously -- since he cannot walk the floor of any convention unheralded -- but that didn't last.
"I would wear a rubber mask, and use a funny voice, and usually they would say, 'Is that you, Shatner?' "