It is true that in Isaiah 64:6, the prophet makes that statement about the righteousness of Israel saying, "We are all as an unclean thing, and all our righteousness are as filthy rags." Let us examine two ideas relative to the meaning of this statement.
First, our righteousness compared to the righteousness of the Lord is as nothing. As Paul put it, "As it is written, there is none righteous, no not one" (Romans 3:10) and he said that "All have sinned, and come short of the glory of God" (Romans 3:23). Second, we become truly righteous not through our own righteousness, but through the power of Christ's righteousness. Therefore, to become more like Christ we must partake of the divine nature of Christ (2 Peter 1:4) and his righteousness. Someone once said, "There is a righteousness of men and a righteousness of God." Surely Isaiah was referring to the righteousness of men, which indeed is as filthy rags.
Yet the Lord repeatedly taught that we cannot obtain his grace without our own righteous effort. Our Savior told us to seek "the kingdom of God, and his righteousness; and all things will be added unto [us]" (Matt. 6:33) He told his followers that their righteousness must exceed the righteousness of the Scribes and Pharisees or they wouldn't be able to enter into the Kingdom of Heaven (Matt. 5:20). In the Sermon on the Mount the Lord tells us that there are degrees of righteousness and a certain degree (more than Scribes and Pharisees) is necessary to get into heaven. Teachings about righteousness are consistent throughout the New Testament. The Lord even tells us to be perfect even as our Father in Heaven is perfect (Matt 5:48).
To be righteous is to be right with God. To be right with God comes by accepting both Christ's grace and by obeying his commandments, following his teachings and doing the will of the Father.
Those who accuse us of trying to "work our way to heaven" almost seem to be teaching that we should not do our best to serve our Father in Heaven and follow his Son. If they are indeed teaching this, they are grossly out of harmony with the teachings of Jesus Christ. Many essentially teach that confessing his name and saying "Lord, Lord" will gain them entrance into the Kingdom of Heaven. These are not modem heresies. The Lord, perhaps seeing our day, warned that those who simply confess his name will not enter into the Kingdom of Heaven, but rather "he that doeth the will of my Father which is in heaven" (Matt. 7:21).
Remember, Christ with outstretched arms did not say "Believe in me." What he did say was, "Follow me."
One of the most vivid examples of how the Lord feels about righteousness is found in Matthew 25. Here the Lord divides the people of the nations into two groups: the sheep, or righteous, on his right hand; and the goats, or unrighteous, on his left. Both groups ask why they were assigned that way, and the Lord answers that the division was made as a result of how they treated the less fortunate—the hungry, naked, thirsty, and sick. The sheep, or the righteous as the scripture calls them, cared for the needy; thus they are blessed of "my father, [and] inherit the kingdom prepared for you from the foundation of the world" (Matt. 25:34).
The goats, on the other hand, are cursed "into everlasting fire, prepared for the devil and his angels" (Matt. 25:41). The example is summed up in a way that clearly outlines the value of being righteous and following the example of our Lord and Savior Jesus Christ: "And these [the goats] shall go away into everlasting punishment: but the righteous into life eternal" (Matt. 25:46). Note that the Lord did not make an exception for those who profess a belief in him. A belief in Christ is only of value to those who do the will of the Father.
Peter also recognized the value of righteousness when he said those in every nation who feared God and "worketh righteousness" would be acceptable to God (Acts 10:35). The Apostle Paul (whom detractors seem to quote ten times for every time they quote the Lord) once counseled, "Let not then your good be evil spoken of: For the kingdom of God is not meat and drink; but righteousness, and peace, and joy in the Holy Ghost" (Rom. 14:16-17).
Latter-day Saints everywhere must continue to espouse the fruits of righteous living. We must defend our "good works," yet we should also acknowledge that we are ultimately saved by the grace of Christ after all we can do. We cannot save ourselves nor work our way into heaven—-our works would be as dross were it not for the atonement of Jesus Christ and his redeeming grace.