
Beat the rap
Legal Origin
The phrase has a legal background, suggesting escape from legal charges or accusations. 
Not Literally
It is used in a figurative sense and does not mean physically beating anything. 
Often Negative
May imply that someone escaped punishment unfairly or through deceit. 