To have one's behavior match that of harmful and repulsive customs
To do bad things with bad people; to associate oneself with bad trends or social customs due to lack of personal principles
Negative
很可惜,他最终还是和那伙坏人同流合污了 | Hěn kěxí, tā zuìzhōng háishì hé nà huǒ huàirén tóngliúhéwū le
It's too bad, in the end he still fell in with that bad crowd
[Source]
他不但不接受老师的教育,而且还继续与那伙坏人同流合污 | Tā bùdàn bù jiēshòu lǎoshī de jiàoyù, érqiě hái jìxù yǔ nà huǒ huàirén tóngliúhéwū
Not only did he not heed the teacher's lessons, but he also continued to associate with that bad group of people
[Source]
To fall in with a bad crowd/bad people/group
None
In 孟子's (Mèng Zǐ) response to his student, he says, "同乎流俗,合乎污世" (tóng hū liú sú, hé hū wū shì). This was eventually shortened to the chengyu 同流合污.
《孟子》(Mèng Zǐ), a classic Confucian work written by the philosopher of the same name. The work is often known in English as "The Book of Mencius."
Once, the great Confucian scholar 孟子 (Mèng Zǐ, or Mencius) was chatting with his student, 万章 (Wàn Zhāng) about the fact that 孔子 (Kǒng Zǐ, or Confucius) despised two-faced people. 万章 didn't know kind of person classified as two-faced, so he asked for an explanation.
孟子 said, "Two-faced individuals are those who work to curry favor with others and who disregard what is wrong and right in their effort to stay on good terms with people. They are the kind of individual who would simply go along with unreasonable happenings in the world. While on the surface they may look like decent people, they are rotten to the core."