Returning to one's hometown in glory was an idiom. It meant that one had to return to their hometown after becoming rich and noble to show their glory to the villagers. This idiom came from Sima Qian, a historian of the Western Han Dynasty. In the story, after the Overlord Xiang Yu conquered Xianyang, someone advised him to set up the capital. However, Xiang Yu was eager to return to the east because he missed his hometown. He said a famous saying,"If wealth does not return to his hometown, it is like walking at night in brocade." Later, this idiom was extended to mean returning to one's hometown after becoming rich and boasting to the villagers.
It's a mix. 'Your Honor' uses real incidents as a starting point but fictionalizes and dramatizes the story for entertainment purposes. While not a direct retelling of one specific true story, it has roots in real-life legal situations.