My bad feeling was proven right. We were framed for killing the Klingon chancellor in a plot that went to the top of both the Federation and the Empire. After a sham trial Bones and I were sentences to a short life on a harsh mining colony.
Thanks to clever thinking of my crew and unlikely help (never trust a shape-shifter), we were rescued, and saved the President from being assassinated at the peace conference.
We were ordered to return to Earth. To put the Enterprise into mothballs.
I thought they could wait a few weeks so ordered the ship on a new course, but my dreams got pretty impatient. Next thing I knew I was retired, and touring a brand new Enterprise. With a brand new captain.