The painting depicts Cossacks writing a reply to the demand of Turkish Sultan Mehmed IV to surrender (around 1670):
As the Sultan; son of Muhammad; brother of the Sun and Moon; grandson and viceroy of God; ruler of the kingdoms of Macedonia, Babylon, Jerusalem, Upper and Lower Egypt; emperor of emperors; sovereign of sovereigns; extraordinary knight, never defeated; steadfast guardian of the tomb of Jesus Christ; trustee chosen by God himself; the hope and comfort of Muslims; confounder and great defender of Christians—I command you, the Zaporozhian Cossacks, to submit to me voluntarily and without any resistance, and to desist from troubling me with your attacks.
The original reply was lost, but in the 18th century, a copy was made. When the painter heard of it, he got inspired to paint this scene. The Cossacks had a lot of fun coming up with a reply containing as many insults as possible:
Thou art a Turkish imp, the damned devil’s brother and friend, and a secretary to Lucifer himself. What the devil kind of knight art thou that cannot slay a hedgehog with your naked arse? The devil shits, and your army eats. Thou a son of a bitch wilt not ever make subjects of Christian sons; we have no fear of your army, by land and by sea we will battle with thee, go fuck thy mother.
Thou art the Babylonian scullion, Macedonian wheelwright, brewer of Jerusalem, goat-fucker of Alexandria, swineherd of Greater and Lesser Egypt, Armenian pig, Podolian villain, catamite of Tartary, hangman of Kamyanets, and fool of all the world and underworld, a fool before our God, a grandson of the Serpent, and the crick in our dick. Pig’s snout, mare’s arse, slaughterhouse cur, unchristened brow, screw thine own mother!
So the Zaporozhians declare, you lowlife. Thou wilt not even be herding Christian pigs. Now we shall conclude, for we don’t know the date and don’t have a calendar; the moon’s in the sky, the year in the book, the day’s the same over here as it is over there; for this kiss our arse!