The exact origin of the Nicolaitans is unclear. Some Bible commentators believe they were a heretical sect who followed the teachings of Nicolas—whose name means “one who conquers the people”—who was possibly one of the deacons of the early church mentioned in Acts 6:5. It is possible that Nicolas became an apostate, denying the true faith and became part of a group holding "the doctrine of Balaam," who taught Israel "to sin by eating food sacrificed to idols and by committing sexual immorality." Clement of Alexandria says, “They abandoned themselves to pleasure like goats, leading a life of self-indulgence.” Their teaching perverted grace and replaced liberty with license.
Other commentators believe that these Nicolaitans were not so called from any man, but from the Greek word Nicolah, meaning "let us eat," as they often encouraged each other to eat things offered to idols. Whichever theory is true, it is certain that the deeds of the Nicolaitans were an abomination to Christ. They, like the Gnostics and other false teachers, abused the doctrine of grace and tried to introduce licentiousness in its place (2 Peter 2:15, 19; Jude 1:4).
Jesus commends the church of Ephesus for hating the deeds of the Nicolaitans as He does (Revelation 2:6). No doubt the leaders of the Ephesian church protected their flock from these destructive heresies and kept their people from committing the same evil deeds. All sin is hateful to Christ, as it should be to His followers, as we hate men’s evil deeds, not the men themselves. For the church at Pergamos, Jesus had not commendation, but censure. Unlike the Ephesians, they actually embraced the teachings of the Nicolaitans (Revelation 2:15). Jesus warns them that unless they repent, they are in danger of the judgment that is sure to fall on those who teach false doctrine, attack His church, and destroy His people. The sword of judgment is poised over their heads, and His patience is not limitless (Revelation 2:16; 19:15).
The lesson for us is that the church of the Lord Jesus throughout the ages has been plagued by those of the Nicolaitan spirit. The only way to recognize false teaching is to be intimately familiar with truth through the diligent study of the Word of God.