On the eve of retirement, Kirk and McCoy are charged with assassinating the Klingon High Chancellor and imprisoned. The Enterprise crew must help them escape to thwart a conspiracy aimed at sabotaging the last best hope for peace.

Captain Spock: If I were human I believe my response would be "go to hell." If I were human.
Commander Pavel Andreievich Chekov: Course heading, Captain?
Captain James T. Kirk: Second star to the right and straight on till morning.
[Dictating his personal log]
Captain James T. Kirk: Captain's log, stardate 9522.6: I've never trusted Klingons, and I never will. I could never forgive them for the death of my boy. It seems to me our mission to escort the Chancellor of the Klingon High Council to a peace summit is problematic at best. Spock says this could be an historic occasion, and I'd like to believe him, but how on earth can history get past people like me?
Captain Spock: There is an old Vulcan proverb: only Nixon could go to China.
[on whether to help the Klingons]
Captain James T. Kirk: They're animals.
Captain Spock: Jim, there is an historic opportunity here.
Captain James T. Kirk: Don't believe them. Don't trust them.
Captain Spock: They're dying.
Captain James T. Kirk: Let them die!
[pauses... Spock cocks his head in surprise. Kirk recoils and proceeds]
Captain James T. Kirk: Has it occurred to you that this crew is due to stand down in three months? We've done our bit for king and country! You should have trusted me.
Chancellor Gorkon: You don't trust me, do you? I don't blame you. If there is to be a brave new world, our generation is going to have the hardest time living in it.
Captain Spock: Mr. Scott, I understand you're having difficulty with the warp drive. How much time do you require for repair?
Captain Montgomery 'Scotty' Scott: There's nothing wrong with the bloody thing...
Captain Spock: Mr. Scott, if we return to Spacedock, the assassins will surely find a way to dispose of their incriminating footwear, and we will never see the Captain or Doctor McCoy alive again.
Captain Montgomery 'Scotty' Scott: Could take weeks, sir.
Captain Spock: Thank you, Mr. Scott.
Chancellor Gorkon: You have not experienced Shakespeare until you have read him in the original Klingon.
General Chang: "taH pagh, taH be?"
General Chang: [prosecuting] Dr. McCoy, would you be so good as to tell me? What is your current medical status?
Commander Leonard 'Bones' McCoy, M.D.: Well, aside from a touch of arthritis, I'd say pretty good.
[some scattered laughter from the audience; McCoy smiles, but sees Chang, unsmiling]
General Chang: [unamused] You have a singular wit, Doctor.
[Watching a replay of the torpedo hit]
Commander Pavel Chekov: It is Enterprise. We fired them.
Captain Montgomery 'Scotty' Scott: That is not possible! All weapons visually accounted for, sir.
Captain Spock: An ancestor of mine maintained that when you eliminate the impossible, whatever remains, however improbable, must be the truth. If we did not fire those torpedoes, another ship did.
[Kirk and company have prevented the assassination attempt at Khitomer]
Azetbur: What's happened? What's the meaning of all of this?
Captain James T. Kirk: It's about the future, Madame Chancellor. Some people think the future means the end of history. Well, we haven't run out of history quite yet. Your father called the future - "the undiscovered country". People can be very frightened of change.
Azetbur: You've restored my father's faith.
Captain James T. Kirk: And you've restored my son's.
General Chang: I can see you, Kirk.
Captain James T. Kirk: Chang.
General Chang: Can you see me? Oh, now be honest, Captain, warrior to warrior. You do prefer it this way, don't you, as it was meant to be? No peace in our time. "Once more unto the breach, dear friends."
Captain James T. Kirk: I'm going to sleep this off. Please let me know if there's some other way we can screw up tonight.
Commander Leonard 'Bones' McCoy, M.D.: I'm gonna find myself a pot of black coffee.
Captain James T. Kirk: Spock, you want to know something? Everybody's human.
Captain Spock: I find that remark... insulting.
Cmdr. Nyota Uhura: You understand, we have lost all contact with the Captain and Dr. McCoy.
Captain Spock: Yes, at the moment, they are surrounded by a magnetic shield. However, if I know the Captain, by this time, he is deep into planning his escape.
[Cut to Captain Kirk on the losing end of a fist fight with an alien at least twice his size]
General Chang: "To be or not to be?" That is the question which preoccupies our people, Captain Kirk. We need breathing room.
Captain James T. Kirk: Earth, Hitler, 1938.
General Chang: I beg your pardon.
Chancellor Gorkon: Well... I see we have a long way to go.
[last lines]
[Kirk's final Captain's Log]
Captain James T. Kirk: Captain's Log, stardate 9529.1. This is the final cruise of the Starship Enterprise under my command. This ship and her history will shortly become the care of another crew. To them and their posterity will we commit our future. They will continue the voyages we have begun, and journey to all the undiscovered countries, boldly going where no man... where no *one* has gone before.
Captain Hikaru Sulu: In range?
Helmsman Lojur: Not yet sir.
Captain Hikaru Sulu: Come on, come on.
Helmsman Lojur: She'll fly apart!
Captain Hikaru Sulu: *Fly her apart then!*
Captain James T. Kirk: Mr. Scott?
Captain Montgomery 'Scotty' Scott: [over intercom] Aye, sir?
Captain James T. Kirk: Did you find the engine room?
Captain Montgomery 'Scotty' Scott: Right where I left it, sir!
Captain James T. Kirk: Bones, I'm wearing a veridium patch on my back! Spock slapped it there just before we went on Gorkon's ship!
Commander Leonard 'Bones' McCoy, M.D.: Why, that cunning little Vulcan!
Captain James T. Kirk: Bones, are you afraid of the future?
Commander Leonard 'Bones' McCoy, M.D.: I believe that was the general idea that I was trying to convey.
Captain James T. Kirk: I don't mean this future.
Commander Leonard 'Bones' McCoy, M.D.: What is this, multiple choice?
Captain James T. Kirk: Valeris, know anything about a radiation surge?
Lieutenant Valeris: Sir?
Captain James T. Kirk: Chekov?
Commander Pavel Chekov: Only the size of my head.
Captain James T. Kirk: [to himself] I know what you mean.
Captain Spock: Logic, logic, logic. Logic is the beginning of wisdom, Valeris, not the end.
Captain James T. Kirk: [on the viewscreen] Captain Sulu! You realize that just by talking to me, you're violating regulations?
Captain Hikaru Sulu: I'm sorry, Captain, your message is breaking up...
Captain James T. Kirk: Bless you, Captain.
Captain Hikaru Sulu: Nice to see you in action for one last time, Captain Kirk. Take care.
General Chang: In space, all warriors are cold warriors.
Captain Spock: [to Valeris] What you want is irrelevant, what you have chosen is at hand.
Captain James T. Kirk: [dictating his personal log] The Enterprise hosted Chancellor Gorkon and company to dinner last night. Our manners weren't exactly Emily Post. Note to the Galley; Romulan Ale no longer to be served at diplomatic functions.
Captain James T. Kirk: [Spock has beamed Kirk and Bones aboard just before they find out who framed them] No! No! Of all the - son of a - Couldn't you have waited two seconds? They were just about to tell us the whole thing!
Commander Pavel Andreievich Chekov: You want to go back?
Commander Leonard 'Bones' McCoy, M.D.: Absolutely not!
Captain James T. Kirk: [whispering] It's cold.
Commander Pavel Chekov: I don't understand. If there was another ship underneath us, surely the assassins beamed aboard from that vessel, not Enterprise.
Captain Spock: You're forgetting something, Mr. Chekov. According to our ship's databanks, this ship fired those torpedoes. If we did, the killers are here. If we did not, whoever altered the databanks is here. In either case, what we are looking for, is here.
Admiral Cartwright: Arrest those men!
Captain Spock: Arrest yourself!
General Chang: [over the public address speakers] "I am constant as the northern star."
Commander Leonard 'Bones' McCoy, M.D.: I'd give real money if he'd shut up.
[the crew enter the bridge]
Kirk: Once again, we've saved civilization as we know it.
McCoy: And the good news is they're not going to prosecute.
Uhuru: They might as well have prosecuted me. I felt like Lt. Valeris.
McCoy: [looks at Spock] Well, they don't prosecute people for having feelings.
Chekov: Just as well, or we'll all have to turn ourselves in.
[the Excelsior is knocked off course by a huge shockwave, and Commander Rand intercepts a message from the Klingon moon Praxis]
Klingon Officer: [in Klingon] This is an emergency! We have suffered...!
[the message abruptly cuts off, replaced by the seal of the Klingon Empire, and then Kerla's face]
Brigadier Kerla: This is Brigadier Kerla speaking for the High Command. There has been an incident on Praxis. However, everything is under control, we have no need for assistance. Obey treaty stipulations and remain outside the Neutral Zone. This transmission ends now.
Captain Hikaru Sulu: An *incident*?
Commander Janice Rand: Do we report this, sir?
Captain Hikaru Sulu: [turning to Rand] Are you kidding?
Lieutenant Valeris: A Bird-of-Prey?
Captain Spock: A Bird-of-Prey.
Commander Pavel Chekov: Cloaked?
Captain Montgomery 'Scotty' Scott: A Bird-of-Prey cannot open fire when she's cloaked!
Captain Spock: All things being equal, Mr. Scott, I would agree with you. However, all things are not equal. This one can.
Captain Spock: Two months ago, a Federation starship monitored an explosion on the Klingon moon, Praxis. We believe it was the result of over-mining and insufficient safety precautions. The moon's decimation means a deadly contamination of their ozone layer. They will have depleted their supply of oxygen in approximately fifty Earth years. Due to their enormous military budget the Klingons do not have the resources to combat this catastrophe. Last month, at the behest of the Vulcan ambassador, I opened a dialogue with Gorkon, Klingon chancellor of the High Council. He proposes to begin negotiations at once.
Admiral Cartwright: Negotiations for what?
Captain Spock: The dismantling of our starbases and outposts along the Neutral Zone, an end to nearly 70 years of unremitting hostility which the Klingons can no longer afford.
Captain Hikaru Sulu: [seeing the convictions of Kirk and McCoy on the Klingon broadcast] Send to Commander, Enterprise: "We stand ready to assist you" - Captain Sulu, USS Excelsior.
[Spock and McCoy are heading for the Torpedo bay]
Commander Leonard 'Bones' McCoy, M.D.: Bet you wished you'd stood in bed!
Captain Hikaru Sulu: [an energy wave has buffeted Excelsior] Don't tell me that was any meteor shower!
Captain James T. Kirk: Where's that damn torpedo?
Commander Leonard 'Bones' McCoy, M.D.: It's ready, Jim. Lock and load!
Captain James T. Kirk: [clenches fist] Fire!
Captain Montgomery 'Scotty' Scott: [referring to Gorkon's daughter, whom he believed killed Gorkon] That Klingon bitch killed her father.
Captain Spock: Her own father?
Lieutenant Valeris: It is an old story, sir.
Captain Montgomery 'Scotty' Scott: They don't place the same value on life as we do, Spock. You know that. Mark my word, she did not shed one bloody tear.
Captain Spock: Hardly conclusive, Mr. Scott, since Klingons have no tear ducts.
Lieutenant Valeris: We must inform Starfleet Command...
Captain Montgomery 'Scotty' Scott: Inform them of what? A new weapon that's invisible? Raving lunatics, that's what they'll call us! They'll say we're so desperate to exonerate the captain that we'll say anything.
Captain Spock: And they would be correct. We have no evidence, only a theory which happens to fit the facts.
Kirk: What are we all doing here?
McCoy: Maybe they're throwing us a retirement party.
Scotty: That suits me. I just bought a boat.
Uhuru: This had better be good. I'm supposed to be chairing a seminar at the Academy.
Chekov: Captain, isn't this just for top brass?
McCoy: If we're all here, where's Sulu?
Kirk: *Captain* Sulu, on assignment. Where's Spock?
[Quote adaptation from the Cuban Missile Crisis of 1962]
General Chang: Indeed. The record shows that Captain Kirk once held the rank of Admiral. And that Admiral Kirk was broken for taking matters into his own hands in defiance of regulations of the law. Do you deny being demoted for these charges? DON'T WAIT FOR THE TRANSLATION. Answer me now.
Captain Hikaru Sulu: [seeing the Enterprise] Shields up! All right, now we've given them something else to shoot at.
Captain Hikaru Sulu: [pointing to the image on the viewscreen] Praxis?
Excelsior Officer: What's left of it, sir!
Cmdr. Nyota Uhura: You are Crewman Dax?
Crewman Dax: Yes Commander. What is the problem?
Commander Pavel Chekov: Perhaps you have heard Russian epic of Cinderella? If shoe fits, wear it!
[drops magnetic boots at Dax's feet]
Captain Spock: Mr. Chekov...
[camera pans down to show that Dax's feet are incapable of fitting into boots]
Captain Hikaru Sulu: [after seeing the Enterprise's torpedo hit the Bird-of-Prey] Target that explosion and fire!
General Chang: "Tickle us, do we not laugh? Prick us, do we not bleed? Wrong us, shall we not revenge?"
General Chang: "Cry havoc, and let slip the Dogs of War."
Captain Spock: Doctor, would you care to assist me in performing surgery on a photon torpedo?
Commander Leonard 'Bones' McCoy, M.D.: Fascinating!
Martia: You're Kirk and McCoy, I presume.
Captain James T. Kirk: How did you know that?
Martia: We don't get many presidential assassins.
Captain James T. Kirk: We didn't kill Gorkon!
Martia: Of course not. But there is a reward for your death.
Commander Leonard 'Bones' McCoy, M.D.: That figures.
Captain Spock: The lieutenant was the first Vulcan to be graduated at the top of her class.
Captain James T. Kirk: You must be very proud.
Lieutenant Valeris: I don't believe so.
Commander Leonard 'Bones' McCoy, M.D.: She's a Vulcan all right.
Excelsior Officer: [checking the scanners] I've confirmed the location of Praxis, but...
Captain Hikaru Sulu: What is it?
Excelsior Officer: [turning to face Sulu] I cannot confirm the existence of Praxis!
Chancellor Gorkon: And this is General Chang, my chief of staff.
General Chang: I have... so wanted to meet you, Captain.
Captain James T. Kirk: I'm not sure how to take that.
[In a conversation with Spock]
Captain James T. Kirk: You're a great one for logic. I'm a great one for rushing in where angels fear to tread. We are both extremists. Reality has brought us somewhere in-between.
General Chang: Well, most kind... parting is such sweet sorrow. Captain, have we not heard the chimes at midnight?
[His ship is about to be destroyed by The Enterprise]
General Chang: [last words] To be... or not to be?
[after Kirk and Martia kiss passionately]
McCoy: What IS it with you, anyway?
Kirk: Still think we're finished?
McCoy: Now, more than ever!
Chancellor Gorkon: [last words to Kirk before death] Don't let it end this way, captain.
Captain James T. Kirk: [Valeris has just engaged thrusters to take Enterprise out of Spacedock] Thank you Lieutenant, ahead one quarter impulse power
Lieutenant Valeris: [spins in chair to face Kirk] Captain, may I remind you that regulations specify thrusters only whilst in spacedock.
Commander Leonard 'Bones' McCoy, M.D.: [the bridge crew cough loudly, Chekov shakes his head, Uhura tuts softly. McCoy leans in to tease Spock] Jim?
Captain James T. Kirk: You heard the order, Lieutenant...
Lieutenant Valeris: Aye, sir!
Captain Spock: What we require now is a feat of linguistic legerdemain and a degree of intrepidity before the Captain and Dr. McCoy freeze to death.
Klingon Commander: This is the gulag Rura Penthe. There is no stockade. No guard tower. No electronic frontier. Only a magnetic shield prevents beaming. Punishment means exile from prison, to the surface. On the surface, nothing can survive. Work well, and you will be treated well. Work badly, and you will die.
Federation President: Let us redefine progress to mean that just because we can do a thing, it does not necessarily mean we must do that thing.
Captain James T. Kirk: Names, Lieutenant!
Lieutenant Valeris: I do not remember.
Captain Spock: A lie?
Lieutenant Valeris: A choice.
Commander Pavel Andreievich Chekov: [to Uhura] Guess who's coming to dinner.
Klingon Ambassador: The Chancellor of the High Council is dead - the result of an unprovoked attack while he traveled to see you under a flag of truce on a mission of peace. Captain Kirk was legally arrested for the crime. May I remind you that he and Dr. McCoy boarded Kronos One on their own free will? No of these facts are in dispute, Mr. President.
Federation President: I have ordered a full-scale investigation. In the meantime...
Klingon Ambassador: In the meantime, we expect the Federation to abide by the articles of Interstellar Law, which you claim to cherish. Kirk and Dr. McCoy will stand trial for the assassination of Chancellor Gorkon.
Federation President: Out of the question.
[to Sarek]
Federation President: Ambassador Sarek, there must be some way to extradite these men.
Ambassador Sarek: Mr. President, I share a measure of personally responsibility in this matter, but I am obliged to confirm my esteemed colleague's legal interpretation.
Federation President: What is the position of the Romulan government, Ambassador Nanclus?
Ambassador Nanclus: I must concur with my colleagues.
Federation President: But you can't possibly believe that James Kirk assassinated the Chancellor of the High Council.
Ambassador Nanclus: Mr. President, I don't know what to believe.
Klingon Ambassador: I'm waiting for your answer, sir.
Federation President: This president is not above the law.
[after Kirk wins a fight against an alien twice his size]
Martia: They'll respect you now.
Captain James T. Kirk: That's a comfort. I was lucky that thing had knees.
Martia: That was not his knee.
[Kirk looks at Martia in surprise]
Martia: Not everyone keeps their genitals in the same place, Captain.
Captain James T. Kirk: Anything you want to tell me?
[Martia smiles at Kirk]
Chief in Command: Sir, those men have literally saved this planet.
Federation President: Yes Bill, I know that. And now they're going to save it again... by standing trial.
Captain James T. Kirk: [Fighting Martia who has changed to look like him] Isn't it about time you became something else?
Martia (appearing as Kirk): I like it here.
[as soon as Azetbur finishes her transmission to the Federation President, Kerla unrolls war plans on her desk]
Brigadier Kerla: Attack them now, while we still have the chance!
Klingon general #1: Attack them, or be slaves on their worlds!
Klingon general #2: We can take whole by force what they propose to divide.
Azetbur: War is obsolete, general... as we are in danger of becoming.
[Kirk is fighting with Martia disguised as Kirk]
Captain James T. Kirk: I can't believe I kissed you.
Martia (appearing as Kirk): Must have been your lifelong ambition.
[first lines]
Captain Hikaru Sulu: Stardate 9521.6. Captain's Log, USS Excelsior. Hikaru Sulu commanding. After three years, I have concluded my first assignment as master of this vessel, cataloguing gaseous planetary anomalies in Beta Quadrant. We're heading home under full impulse power. I'm pleased to report that ship and crew have functioned well.
[Considering a military strike against the Klingons]
Federation President: Suppose you precipitate a full-scale war?
Colonel West: In that case, Mr. President, we can clean their choronometers.
Ambassador Nanclus: Mr. President, they are vulnerable... there will never be another time.
Admiral Cartwright: The longer we wait, the less successful the hostages will be, sir.
Admiral Cartwright: I don't know whether to congratulate you or not, Jim.
Commander Leonard 'Bones' McCoy, M.D.: I wouldn't.
Captain Spock: Is it possible that we two, you and I, have grown so old and so inflexible that we have outlived our usefulness?