Legalism is putting rules above God and above human needs. It's in the Bible, Matthew 12:9-10, TLB. "Then He went over to the synagogue, and noticed there a man with a deformed hand. The Pharisees asked Jesus, 'Is it legal to work by healing on the Sabbath day?' (They were, of course, hoping He would say 'Yes so they could arrest Him!). This was His answer: 'If you had just one sheep, and it fell into a well on the Sabbath, would you work to rescue it that day? Of course you would. And how much more valuable is a person than a sheep!"
Legalism is a form of slavery. It's in the Bible, Galatians 4:8-9, TLB. "Before you Gentiles knew God you were slaves to so-called gods that did not even exist. And now that you have found God (or I should say, now that God has found you) how can it be that you want to go back again and become slaves once more to another poor, weak, useless religion of trying to get to heaven by obeying God's laws?"
Legalism is attractive, but destructive. It's in the Bible, Colossians 2:23, NIV. "Such regulations indeed have an appearance of wisdom, with their self-imposed worship, their false humility and their harsh treatment of the body, but they lack any value in restraining sensual indulgence."
We are saved by faith, not works. It's in the Bible, Ephesians 2:8-10, NIV. "For it is by grace you have been saved, through faith—and this not from yourselves, it is the gift of God—not by works, so that no one can boast. For we are God's workmanship, created in Christ Jesus to do good works, which God prepared in advance for us to do."