For once, I can not confirm the origin but it sounds a lot like it's from westerns.
It simply means to be defeated or die but usually in some sort of battle or fight.
Therefore, you'd be wrong to use it to describe completed actions. It would be more appropriate to be used when beating opponents.
Maybe Freddy can explain.