I recently highlighted how Sam Storms defines legalism: "the tendency to regard as divine law things that God has neither required nor forbidden in Scripture, and the corresponding inclination to look with suspicion on others for their failure or refusal to conform."
Some thoughtful friends of mine graciously pushed back on that definition. I replied to one of those friends with this comment:
Thanks for raising this question. So many disagreements dissipate when we carefully define terms.
There are at least two senses of legalism:
I grant your point that technically legalism is attempting to obtain salvation by works.
But usage determines meaning, so I don't think we can limit the definition to that one sense since today many people use the word legalism to denote something different than that. Sam Storms fits here; and he's also careful to say that we can be "legalistic" (as opposed to being "legalists" in the first sense of the term).
John MacArthur on how to serve Christians who are needlessly restrictive
C. J. Mahaney and Doug Moo on legalism
Bob Gonzales, "Confessions of a Recovering Legalist"
Dave Swavely on judgmental statements
Graeme Goldsworthy on "Legalism: Evangelical Judaism"
How to Disagree with Other Christians about Disputable Matters
law_and_libertyI recently read a new book on legalism, and some of the authors carefully define legalism in a way that includes both senses of the term that I highlight above:
Don Kistler, ed. Law and Liberty: A Biblical Look at Legalism. Orlando: Northampton, 2013. 197 pp.
1. Don Kistler, "Introduction: What Legalism Is, What Legalism Does," p. 2:
Legalism is behavior motivated by the false notion that sinners can earn favor with God, either before or after salvation, through legal means—obedience, ritual, self-denial, or whatever.
2. Phil Johnson, "Real Love and Real Liberty," pp. 163–65:
Two Kinds of Legalism
People who like to bind others' consciences with their own rules and restrictions sometimes defend themselves against charges of legalism with a clever diversionary tactic. True legalism, they say, is the brand of false teaching Paul condemned in Galatians 1—the error of making some prerequisite work or religious ceremony a condition of justification. By that narrow definition, a legalist is someone who believes in salvation by works. Therefore, they say, as long as you formally affirm the principle of sola fide (faith as the sole instrument of justification), you can't legitimately be labeled a legalist, no matter how many rules you make and impose on people who are already converted.
A better definition of legalism would be one that echoes Galatians 5:1. Legalism is the error of abandoning our liberty in Christ in order to take on a yoke of legal bondage in the hope that this will earn merit or gain favor with God. There are actually two flavors of legalism expressly condemned in Scripture.
 First is the one recognized and despised even by the strict fundamentalist with his thick rule-book. It's the legalism of the Judaizers. The Judaizers wanted to make circumcision a requirement for salvation. They had fatally corrupted the gospel by adding a human work as a requirement for salvation. That is certainly the worst variety of legalism, because it destroys the doctrine of justification by faith and thereby sets up "a gospel contrary to the one you received" (Galatians 1:8–9). According to the Apostle Paul, that kind of legalist is not an authentic Christian.
 But another kind of legalism is the legalism of the Pharisees. It's the tendency to measure spirituality by a list of manmade rules. This kind of legalism is a common pitfall even within the household of faith. At the root of Pharisaical legalism is a belief that holiness is achieved by legal means—living one's life by rigorous rules and restrictions: "Do not handle, Do not taste, Do not touch" (Colossians 2:20–22). This type of legalism doesn't necessarily destroy the doctrine of justification like the legalism of the Judaizers. But it does significant damage to the doctrine of sanctification, and it is certainly appropriate to call it what is it: legalism. It is a sinful misapplication of law, an attempt to make law do work that only grace can do. Like the Judaizer's brand of legalism, it brings people under a yoke of bondage Scripture has not placed on them.
As a matter of fact, that is exactly what Jesus said about the legalism of the Pharisees: "They tie up heavy burdens, hard to bear, and lay them on people's shoulders" (Matthew 23:4).