A wolf and a jackal often went hunting together. Once they came to a sheepfold the walls of which were firmly built and too high for them to get over. Then they had an idea: Since the wolf had long forelegs and short hindlegs while the jackal had short forelegs and long hindlegs, the wolf stood on the neck of the jackal, and the jackal stood up on its hindlegs. In this was the wolf climbed over the wall to where the sheep were.
This idiom is used to describe doing evil things in collusion with others.