"Rightful Heir" is from the 6th season.
Worf is going through a crisis of lack of faith in Kahless, an ancient warrior who once brought honor and unity to the Klingon people. He questions whether or not he actually had faith to begin with after his experience with the young Klingons from the prison camp (see episode "Birthright").
He goes to a temple to meditate in hopes of having a vision of Kahless and receive instructions on the course of his life and regain faith.
Then after several failed attemps, a flesh and blood Klingon appears and tells Worf he is Kahless. "I have returned" he says.
Worf has his doubts and invites this Kahless on board the Enterprise for further biological testing. Klingon Chancellor Gowron brings aboard a knife said to contain the blood of Kahless to see if the sample matches the new Kahless blood. Dr. Crusher performs the test and it's conclusive, the blood samples match.
However, Kahless' memory is full of gaps--not remembering the names of warriors, not providing information about the afterlife--when questioned by Worf and Gowron for details. Gowron challenges Kahless claims about his fighting prowess and they fight. Gowron gets the upper hand and almost kills him when Worf stops him.
Later, when Worf confronts Kahless and the members of the guardians who came aboard with him, the guardians admit that they took samples of the blood and tissue from the knife and made a clone of Kahless. Worf insists that they not propagate this charade and the guardians insist that their people need Kahless to bring in a new era of hope and unity. Gowron insists that the imposter will only bring division and that members of his own crew are now waiting for instruction from Kahless while others view him as a fraud.
In the end, Worf talks Gowron into agreeing to allow Kahless to be emperor, "a figure head" for the people rather than have him executed because it's already too late. It doesn't matter now if this new Kahless lost a fight with Gowron or that he's a clone, what matters is that now he has followers and his death will only cause further division and lead to new civil wars among the people. Worf tells them that the people need something to believe in, something greater than themselves.
There's even an exchange between Worf and Data which inspirers Worf to come up with the idea of making Kahless important in Klingon culture. Data tells Worf that humans told him he was a machine, just a collection of circuits made to perform certain funtions. It was up to him to become a person so he took "a leap of faith" to become more than just a machine.
I didn't like this episode because of the faith angle. Having faith in one's self to achive is a good enough point, but using a long dead legend and his teachings as that lesson in faith goes against Star Trek's idea of the search for knowledge using scientific discovery and exploration. Even the show's creator Gene Roddenberry was an atheist and I doubt he would have given much appreciation for this episode. This episode seemed to be promoting the idea of the necessity of having faith to give one's life purpose, focusing on a resurrected being, rather than the humanistic view of self discovery and making the world a better place for it's own sake.