"The pot calling the kettle black" is a proverbial idiom that may be of Spanish origin, of which English versions began to appear in the first half of the 17th century. The idiom is glossed in the original sources as being used by a person who is guilty of the very thing of which they accuse another and is thus an example of psychological projection, or hypocrisy.
Origin
The earliest appearance of the idiom is in Thomas Shelton's 1620 translation of the Spanish novel Don Quixote. The protagonist is growing increasingly restive under the criticisms of his servant Sancho Panza, one of which is that "You are like what is said that the frying-pan said to the kettle, 'Avant, black-browes'." The Spanish text at this point reads: Dijo la sartén a lacaldera, Quítate allá ojinegra. It is identified as a proverb in the text, functioning as a retort to the person who criticises another of the same defect that he plainly has. Among several variations, the one where the pan addresses the pot as culinegra makes clear that they are dirtied in common by contact with the cooking fire. This translation was also recorded in England soon afterwards as "The pot calls the pan burnt-arse" in John Clarke's collection of proverbs, Paroemiologia Anglo-Latina. A nearer approach to the present wording is provided by William Penn in his collection Some Fruits of Solitude in Reflections and Maxims : But, apart from the final example in this passage, there is no strict accord between the behaviour of the critic and the person censured. An alternative modern interpretation, far removed from the original intention, argues that while the pot is sooty, the kettle is polished and shiny; hence, when the pot accuses the kettle of being black, it is the pot's own sooty reflection that it sees: the pot accuses the kettle of a fault that only the pot has, rather than one that they share. The point is illustrated by a poem that appeared anonymously in an early issue of St. Nicholas Magazine from 1876:
Similar themes in antiquity
In ancient Greece, mention of 'the Snake and the Crab' signified much the same, where the critic censures its own behaviour in another. The first instance of this is in a drinking song dating from the late 6th or early 5th century BCE. The fable ascribed to Aesop concerns a mother crab and its young, where the mother tells the child to walk straight and is asked in return to demonstrate how that is done.
The same theme differently expressed occurs in the Aramaic version of the story of Ahiqar, dating from about 500 BCE. 'The bramble sent to the pomegranate tree saying, "Wherefore the multitude of thy thorns to him that toucheth thy fruit?" The pomegranate tree answered and said to the bramble, "Thou art all thorns to him that toucheth thee".
The Mote and the Beam - In, it is criticism of a less significant failing by those who are worse that is the target of the Sermon on the Mount: "Why do you look at the speck of sawdust in your brother's eye and pay no attention to the plank in your own eye?"