You have lived on the earth in luxury and in self-indulgence. You have fattened your hearts in a day of slaughter.  You have condemned and murdered the righteous person. He does not resist you. (ESV)
When I was a child I loved playing in the snow. One of the things kids like to do is to take a snow ball and roll it down a hill. If it is the right kind of snow it will get bigger and bigger as it rolls down the hill. That small snow ball becomes a huge pile of snow. The same can be true in our lives. If we embrace a small sin, over time, it will grow and grow until it is of monstrous size.
James is talking about the rich people who did not have a proper godly view of wealth. Rather, they loved their riches and not God. As a result of their sinful desire being left to grow it now has turned into a monstrous life that is going to be judged by God. Look at the digression in this verse from enjoying luxury to murdering righteous people.
I imagine that the ones being described as using the court system of their day to take advantage of righteous people did not start out being willing to do that. It is a sinful progression. Because they have embraced a life of luxury these people are willing to do whatever necessary to maintain it, even if it means taking advantage of innocent people.
You may not be a person living in luxury and self-indulgence. If you are, you need to surrender your wealth to the Lordship of Jesus Christ. Use your wealth for the Kingdom of God. Perhaps there is a different sin that you are willing to embrace. Just like that snowball rolling down the hill your life will turn into a monstrous disaster as that sin you have embraced grows and grows.
Consider your life. Is there anything that you are embracing that is not pleasing to the Lord? Ask God to show you. He will forgive you and help you to get rid of the sin that destroys.