Fleet Admiral Cartwright was a high-ranking Starfleet officer in the 23rd century. In that capacity, he oversaw the efforts to protect Earth from a highly-destructive probe in 2286, and was a member of a conspiracy to sabotage peace talks between the Federation and the Klingon Empire.
In 2286, when an extremely advanced probe of unknown origin began vaporizing Earth's oceans and ionizing its atmosphere, Cartwright acted as the Federation President's escort in Starfleet Command, supplying him with information and status updates. Cartwright initiated a Starfleet-wide red alert, and attempted to maintain communication with Admiral Kirk aboard a stolen Klingon Bird-of-Prey, who was attempting to initiate a plan wherein he would use time travel to retrieve two humpback whales with which to respond to the probe's transmissions. (Star Trek IV: The Voyage Home)
Admiral Cartwright was a key player in the 2293 conspiracy to sabotage peace talks with the Klingon Empire. During a classified Starfleet briefing in which Captain Spock conveyed information on the weakened status of the Empire in the wake of the destruction of Praxis, Cartwright voiced his opinion that the prudent course of action would be to attack and bring the Klingons "to their knees," and that the abolition of the Klingon Neutral Zone would lead to a large influx of Klingons into Federation space. When Captain Kirk voiced his agreement that seeking peace with the Empire was an inappropriate course of action, Cartwright seized upon Kirk's prejudices to make him a scapegoat in the conspiracy to avert peace.
Cartwright and his conspirators subsequently framed Kirk and Doctor McCoy for the assassination of Klingon Chancellor Gorkon, and attempted to frame the Klingons for the assassination of the Federation President. Cartwright and the others were eventually exposed, however, by the crew of the USS Enterprise, and Cartwright was taken into custody by a security team from the USS Excelsior. (Star Trek VI: The Undiscovered Country)
"I must protest. To offer Klingons safe haven within Federation space is suicide. Klingons would become the alien trash of the galaxy."
- - Cartwright, on the proposed peace treaty with the Klingons
"I don't know whether to congratulate you or not, Jim."
- - Cartwright and McCoy, to Kirk on his diplomatic mission with Gorkon
The Star Trek IV novelization shows that Cartwright replaced Morrow as Commander, Starfleet, in the time that Kirk and crew were on Vulcan, and Cartwright even comes to Vulcan to urge Kirk to return to Earth, but Kirk refuses until he is sure that Spock has recovered completely.
The novel Cast No Shadow establishes that Cartwright died in prison in 2298 from an apparent respiratory infection, though there was some suspicion he had been murdered, leaving Valeris as the last surviving Starfleet officer complicit in the Khitomer conspiracy.