Meaning:
Literally it means: pay the devil what you owe him.
Figuratively it is used to say: give back what you owe.
Origin:
From Shakespeare`s Henry IV Part 1:
Constable:
I will cap that proverb with "There is flattery in friendship."
Orleans:
And I will take up that with "Give the devil his due."