When his conscience doesn't let him rest with peace and assurance . Strict, often too strict, and literal adherence to law. Good Christians ought to be legalistic enough to obey laws. Legalism can be eternally bad. It is a major cause of missing salvation.
Pharisaic legalism is spiritual poison.
And he spake this parable unto certain which trusted in themselves that they were righteous, and despised others. The Pharisee stood and prayed thus with himself God, I thank thee that I am not as other men are, extortioners, unjust, adulterers, or even as this publican. Here is a legalist. It's the person who puts confidence in his own self-righteousness. It could be trusting your ability to keep the right rules or the church's standard of conduct.