Japanese have two different ways of pronunciating a kanji, depending on its usage.
On-yomi is loosely based on Chinese pronuncaition, but with centuries past since its original use, you can pretty much throw that idea out of the window.
Hell, take the word "日本語 (Japanese)", which is "Nihongo", but Chinese would pronunciate it as "Ribenyu".
If we were to use Japanese pronunciation for 北京 (Beijing), which is Peking in China, it'd be Hokkyou.
(which we don't, and I'll explain why below).
As you can see, it's COMPLETELY different, with almost no similarity at all.
When Japanese pronunciate famous Chinese cities and locations, the Japanese reading is for the most part ignored, and use a pronunciation closer to the Chinese, because well you know, it'd be rude and dumb to call say… 上海 "Joukai" instead of "Shanghai".
So it's read "Shanhai", even though that's not how you would say it in Japanese, but it's an international standard.
However, a lot of Chinese don't do the same. They seem to read everything in their own way, making it completely different from what it's supposed to. That's why they say "Donjing" instead of Tokyo like the rest of the world.
(Which, no offense to Chinese around, I find rather dumb. I mean, it's an international city, it would make a whole lot more sense to cast aside localization and read it in a way that can be recognized universally)
However, historical names of people don't work the same way - I mean, you can't expect an average Japanese to know the thousands of different Chinese names in history. So Chinese heroes such as the ones in Kingdom (Spring-Autum feudal times) and Three Kingdoms are localized into Japanese reading.
Unlike say, Beijing and Shanghai, which are universally famous locations and would hinder business transaction if not said right.
In contrast, names of famous Chinese people of the current times are often read in their native names, instead of localized Japanese ones like historical heroes. Because you know, they're still alive and it'd be kinda rude otherwise. lol
To sum it up:
Present-day Chinese cities -> Kept in Chinese pronunciation
Present-day famous Chinese names -> Mostly kept in Chinese pronunciation (written in katakana for easy reading)
Figures from historical past -> usually localized into Japanese reading
Historical Dynasties and other locale names not existing today -> usually localized into Japanese reading.
It's pretty clear-cut how they are differentiated, it all depends on its relevancy to modern day.