Jesus is talking to a group of Jews including some Pharisees (John 8:13) and possibly other Jewish leaders (John 8:22 NET). He had said to them
“If God were your Father, you would love me, for I came from God and I am here. I came not of my own accord, but he sent me. Why do you not understand what I say? It is because you cannot bear to hear my word. You are of your father the devil, and your will is to do your father’s desires. He was a murderer from the beginning, and has nothing to do with the truth, because there is no truth in him. When he lies, he speaks out of his own character, for he is a liar and the father of lies. (John 8:42-44)
So the contrast is with God as their Father. Instead of following God, they were following “the devil” — that is, their own human desires. The phrase “He was a murderer from the beginning” probably refers back to the first murderer — Cain — who also followed his own desires rather than obey God (Genesis 4:3-8).