Where does it originate from?
As early as the Yuan Dynasty, herders were proud of raising horses. When horse herders encountered one another, they would often pat the buttocks of the others’ horse and say, “What a good horse!” to fawn on the owner of the horse. At first, people only praised truly good horses, but soon people began to do this to flatter others, regardless of whether the herder’s horse was good or bad, strong or weak. In this way, people began to flatter and kiss up to one another, and this action became known as “拍马屁 (pāimǎpì) to kiss up.”
What does it mean?
拍马屁 (pāimǎpì) refers literally to patting a horse’s buttocks: 拍 (pāi) means to pat; 马 (mǎ) is horse and 屁 (pì) refers to fart or buttocks. But now 拍马屁 (pāimǎpì) is widely used as an analogy to ridicule blatant flattery that is meant to please others without regard for objective reality. Consequently, people who like to kiss up or brownnose are called 马屁精 (mǎpìjīng), which means flatterer or brownnoser.
Where is it used?
拍马屁 (pāimǎpì) is usually used in the following context:
Zhè jiāhuo shì pāimǎpì de háoshǒu, zǒng néng ràng shàngsī gāoxìng!
这 家伙 是 拍马屁 的 好手， 总 能 让 上司 高兴！
This guy is an expert at kissing up, always pleasing his authorities.
Tā shànyú pāimǎpì, suǒyĭ shēngqiān hěn kuài.
他 善于 拍马屁， 所以 升迁 很 快。
He is good at kissing up, so he gets promoted very quickly.