Legalism is pretty well summed up by examples of the pharisee in the time of Christ
The Chosen (Love it or hate it) Shows Pharisees in this contextual light accurately according to the Scriptures and records from all.
Its essentially putting rules above God & Human needs, an example of this was when the pharisees again where mad at Christ for asking a man to get up and move when he was paralyzed before which resulted in him moving a mat & healing someone during the sabbath, The Bible condemns this practice of Legalism in
Matthew 12:9-10
9 And when he was departed thence, he went into their synagogue:
10 And, behold, there was a man which had his hand withered. And they asked him, saying, Is it lawful to heal on the sabbath days? that they might accuse him.
They where most likely hoping that the Savior would say Yes so that they could arrest The Savior however his answer was that and this is shown in
Matthew 12:11-12
11 And he said unto them, What man shall there be among you, that shall have one sheep, and if it fall into a pit on the sabbath day, will he not lay hold on it, and lift it out?
12 How much then is a man better than a sheep? Wherefore it is lawful to do well on the sabbath days.
This practice of Legalism is even went as far as to be called Bondage or Slavery in the Book of Galatians 4:8-9
8 Howbeit then, when ye knew not God, ye did service unto them which by nature are no gods.
9 But now, after that ye have known God, or rather are known of God, how turn ye again to the weak and beggarly elements, where unto ye desire again to be in bondage?
Legalism is attractive as an idea but destructive, in Collossians 2:23
23 Which things have indeed a shew of wisdom in will worship, and humility, and neglecting of the body: not in any honour to the satisfying of the flesh.
This reminds me very much so of the Words of the Prophet Joseph Smith and how the Church goes about things todays, the infamous quote we did a Lesson on before goes “I teach them correct principles and the people govern themselves”, this idea which really does work for the most part is a counter to this Pharisaical idea of Legalism.