It means those who spend all their time seeking violence and trying to kill others are destined to find the violence they seek and die instead. It is meant as a warning to not seek fights, but to try to find peaceful resolutions to problems if at all possible (a sentiment that is too often forgotten and sorely needed in this world).
You hear about Blake? He thought he was all that and went to front with the guys in the barro. Even with his piece, he ended up fufilling the old saying, live by the sword, die by the sword.
This expression was adapted from Jesus’ words to His disciple Peter in Matthew 26:52--But Jesus said to him, "Put your sword in its place, for all who take the sword will perish by the sword."