Ding Yunpeng was born in Xiuning in southern Anhui province. His father was a physician by profession but collected art and painted in his free time. Ding Yunpeng spent his early decades in the culturally sophisticated cities of Suzhou and Songjiang, where he became a professional painter with a style in the tradition of the Wu School. In the late 1580s, he returned to Anhui and in addition to painting, he worked as a book illustrator. By the time of the late 1590s, Ding Yunpeng's style changed dramatically: his lines became crisper and more angular, his style more expressionistic, and his sensibility more fantastic, a shift that was paralleled by other artists in the turbulent years of the end of the Ming.
This theme of Sweeping the Elephant is known to have been painted for centuries by numerous artists in China and dates back at least to Zhang Sengyou (active 500-550), according to the Xuanhe Huapu. Typically, these scenes include a group of Chinese and foreign sages and attendants circled around a white elephant being washed with a broom and buckets full of water. The earliest known versions showed only figures with no environment. In Buddhist iconography, the white elephant is associated with Shakyamuni's birth and with the bodhisattva Samanthabhadra. In one of his colophons on the mounting of this lot, Wang Wenzhi (1750-1802) identifies the monk-looking figure in white holding a ruyi scepter as Samanthabhadra. By the late years of the Ming dynasty, this image was also understood to represent an admonition to brush away or overcome being distracted by illusory appearances, as the character for elephant, xiang, can also mean "form" or "appearance".
Not only was this theme painted by Ding Yunpeng's contemporaries, including Wu Bin (active ca. 1583-1626) (Beijing Central Academy of Fine Arts), Chen Zi (1654-1711) (Metropolitan Museum of Art, New York), and Cui Cizhong (ca. 1595-1644) (National Palace Museum, Taipei), but Ding himself made several versions. In 1588 he painted a well detailed example, now in the National Palace Museum, Taipei that shows a group of sages, deities, and attendants in a verdant landscape along a river. Specifically, this later version, painted in 1604, contains landscape elements that are much less naturalistic, brushwork that is simplified and crisper, and foreign figures that are caricatured and odd looking. Another version of this scene appeared but as a woodblock print of one of Ding's illustrations of an ink cake. This shift in the artist's style is credited to a number of causes, especially anxiety over the increasing social and political disruption, but also to the influence of crafting images for ink cakes and woodblock prints.