I’ve been wondering about this connection—especially since reading some difficult sections of 1 John1—and I’m glad Calvin is here to clear it up for me:
Surely the first foundation of righteousness is the worship of God. When this is overthrown, all the remaining parts of righteousness, like the pieces of a shattered and fallen building, are mangled and scattered. What kind of righteousness will you call it not to harass men with theft and plundering, if through impious sacrilege you at the same time deprive God’s majesty of its glory? Or that you do not defile your body with fornication, if with your blasphemies you profane God’s most holy name? Or that you do not slay a man, if you strive to kill and to quench the remembrance of God? It is vain to cry up righteousness without religion. This is as unreasonable as to display a mutilated, decapitated body as something beautiful. Not only is religion the chief part but the very soul, whereby the whole breathes and thrives. And apart from the fear of God men do not preserve equity and love among themselves. Therefore we call the worship of God the beginning and foundation of righteousness. (Institutes, 2.8.11)
1“If you know that he is righteous, you know that everyone who does what is right has been born of him” (1 John 2:29). “Everyone who loves has been born of God and knows God” (1 John 4:7). “Everyone who believes that Jesus is the Christ is born of God” (1 John 5:1).