"I cannot really carry it out till I love my neighbour as myself: and I cannot learn to love my neighbour as myself till I learn to love God: and I cannot learn to love God except by learning to obey Him."

Lewis ties loving one's neighbor with loving God based on Matthew 22:35-40 (KJV):

Then one of them, which was a lawyer, asked him a question, tempting him, and saying, Master, which is the great commandment in the law? Jesus said unto him, Thou shalt love the Lord thy God with all thy heart, and with all thy soul, and with all thy mind. This is the first and great commandment. And the second is like unto it, Thou shalt love thy neighbour as thyself. On these two commandments hang all the law and the prophets.

The command to "love thy neighbour" occurs in at least eight passages in the Bible.

"I cannot learn to love God except by learning to obey Him": See John 14:15 ("If ye love me, keep my commandments") and John 15:10 ("If ye keep my commandments, ye shall abide in my love; even as I have kept my Father's commandments, and abide in his love").