The actual quote is from Macbeth's soliloquy in Act I, scene vii, in which Macbeth is considering the consequences that will ensue, if he does, indeed take Duncan's life in order to become King. You have the gist of it, but here is the full quote in its context:
...But in these cases
We still have judgement here; that we but teach
Bloody instructions, which being taught, return
To plague the inventor. This even-handed justice
Commends the ingredients of our poison'd chalice
To our own lips.
It is interesting that you mention "God's judgement," for though Macbeth mentions later in the speech that Duncan's good deeds in his life will "plead like angels...against/The deep damnation of his taking off," he does not invoke God when considering how his own "bloody" actions will come back upon him.
His awareness that he will not get off scott-free for murder, but rather have that which he does unto others done back unto him, does seem to have religious connotation, but, again, he is focused on a natural, "even-handed" sort of justice that awaits every man as a kind of karmic pay-back for deeds committed.
So, his own actions will be the "ingredients" mixed together to create the (in Macbeth's case) "poison" that he himself will drink from his own cup or "chalice."
His reasoning here is sound, and is born out by the events of the remainder of the play. But, even knowing this in advance, Macbeth still decides to kill Duncan. He says:
...I have no spur
To prick the sides of my intent, but only
Ambition is the operative word here, and it is the cause, for Macbeth, of all the murders yet to come in the play. For a more detailed analysis of this speech, please follow the link below.