Chen Shi (陈寔) was a well-learned scholar and a honest and clean official during the late stage of Eastern Han Dynasty of China.
When he governed Tai Qiu (a place name), people there lived and worked in peace and contentment. Yet later since he objected to increasing taxes but could do nothing about it, he resigned with anger.
After he returned home, many people who heard of his fame asked him mediate their disputes. Chen Shi dealt with all cases impartially and earned respects of both sides. Some even said: " I prefer being punished by the government to being criticized by Chen Shi."
After a few years, a serious famine hit Chen Shi's hometown. As a result, some hungry villagers had to get their food from stealing. One night, Chen Shi was woken up by the noise form the beam over his head. Aware of there was a thief hiding there, Chen Shi got up and put on his clothes as if nothing had happened.
Then he called his children and grandchildren to gather in front of him, saying seriously:" A man must preserve his moral integrity. The wrongdoers have not been bad from birth, but once they get used to doing wrong, they will become a real bad guy." Pointing up at the beam, he continued, "I'm afraid the gentleman up on the beam is just this kind of wrongdoer."
Hearing this, the thief was in a cold sweat from fear, and wasting no time, he climbed down, knelt in front of Chen Shi, apologizing to him. Chen Shi forgave him and mildly said: " My friend, you don't look like a bad man; I know you are driven by necessity to do this. Now is the chance for you to turn over a new leaf." Then Chen Shi gave the thief two rolls of silk (silk could be used as money in Eastern Han Dynasty) and let him go.
Later, people called thief "The Gentleman Up On The Beam--Liang Shang Jun Zi".
Background and Writer Comment:This Chinese idiom story is from "Book of the Later Han (后汉书)".
Now the idiom of The Gentleman Up On The Beam--Liang Shang Jun Zi refers to thief.