In 2268, the Excalibur was ordered to test the new M-5multitroniccomputer that had been developed. One of the tests was to participate in wargames against several other starships, including the ISS Enterprise. During the wargames, the M-5 computer supposedly malfunctioned and launched an assault with full weapons power against the Enterprise. The Enterprise was able to survive the assault, and later CaptainSpock suspected it was an attempt to assassinate him. (TOSnovel: Glass Empires: The Sorrows of Empire).
The Excalibur remained under the malfunctioning computer's control for decades afterwards, in the Daystrom Testing Grounds, where the vessel was stored. Excalibur was one of the four starships in M-5's fleet that assaulted the ISS Excelsior in the 2290s. (TOSgame: Shattered Universe)