Having left K9 Mark III to Sarah Jane (TV: A Girl's Best Friend) following their travels with Adric in his fourth incarnation, (PROSE: Just a Small Problem) the Doctor eventually built K9 Mark IV. The Eighth Doctor mentioned Mark IV when he met Sarah Jane in 1996. He indicated that the effort in constructing Mark III was "nothing" in comparison to Mark IV. (PROSE: Interference - Book Two)
While caught up in a Time war between the past and the future on the planet Aoris, K9 was forced to spend a thousand years hidden on the planet, setting himself up as 'the great Machina' so that he could found a cult that would aid the Doctor and Romana in bringing the war to an end, hiding behind a fake computer with a version of the TARDIS until he could return to the Doctor and Romana once the war ended (AUDIO: The Paradox Planet, Legacy of Death).
The Fourth Doctor and K9 Mark II spent an indeterminate period of time together. However, the Doctor appeared to be activating K9 Mark II, implying that no significant time had elapsed since leaving Gallifrey. (TV: The Ribos Operation) It is possible that the Doctor spent some time at Nest Cottage before activating him. (AUDIO: The Stuff of Nightmares)
Someday K9 saved the people at the Aurora from being killed by a Federation war cruiser. (PROSE: Peaceniks) When K9 wanted to help a space ship navigating back to New Earth he met Interstitials. These creatures were living in a state relating to the space or time between things. K9 helped them pass into another existence where it was better for them. (PROSE: Interstitials)
Although the first incarnation of K9 does not appear again in televised Doctor Who media, he is the star of the 2009 K9 television series, in which he undergoes a sort of "regeneration" process from which a new, more sophisticated and futuristic K9 emerges; in the first series of K9, the character is transported to London c. 2050 by Professor Gryffen (Robert Moloney). Though on regeneration the character loses his memory of his adventures with the Doctor, he assists Gryffen and several teenage companions against a dystopian regime of "The Department". The upgraded K9 has new specifications, sporting a sophisticated head-up display, the ability to fly, and more powerful laser weapons.