get the opposite of what one wants
Chinese idiom, Pinyin is Qi ú y ì f ǎ ns ǔ n, which means that in order to get good, but to attract harm. It comes from the second chapter of Lun Heng.
The origin of Idioms
Wang Chong of the Han Dynasty wrote in the second chapter of Lun Heng, tired and harmed, that "Confucius was worried and Mencius was melancholy because he had a square heart, even though he was tired of the common customs, seeking for the good and opposing the bad."
Idiom usage
Otherwise, there are Fenglei cave, Guishen cave, hell cave, dragon and snake cave. If you enter the cave by mistake, it will harm your life. If you want to make a profit, you can avoid it. Song Dynasty Zhang Junfang's Yunji Qiqian volume 112
get the opposite of what one wants
military orders are like a mountain - jūn lìng rú shān
ready to die the cruelest death for principles - gān nǎo tú dì
prick one 's own thigh with a needle to keep himself awake - yǐn zhuī cì gǔ
different approaches but equally satisfactory results - yì qǔ tóng gōng
of noble character and high prestige - dé lóng wàng zhòng