The painting, purchased by Prince Adam Jerzy Czartoryski from an anonymous owner probably in around 1800 in Italy, went to his mother, Princess Izabela Czartoryska (née Fleming), who in 1801 opened the first Polish public museum in Puławy. Initially described as an image of an anonymous woman, the painting was misidentified by Princess Czartoryska as the La Belle Ferronière, possibly based on comparisons with an engraving related to another portrait by da Vinci (dated ca. 1495), currently in the Louvre's collection. That was probably when the inscription (visible to this day) LA BELE FERONIERE / LEONARD D’AWINCI, that mis-spelled the author's name, was placed in the upper left corner of the painting. It is also likely that at the same the time, the background, originally blue and grey, was painted over in black, and some elements of the model's attire were touched up with black paint.
Two Polish art historians: Jerzy Mycielski (in 1893) and Jan Bołoz-Antoniewicz (in 1900) were the first ones to notice that the painting belonging to the Czartoryski family might be the lost portrait of Cecilia Gallerani, a young Milanese lady-in-waiting and lover of Duke Ludovico Sforza, also known as il Moro. The fact that Leonardo painted a portrait of her could be learnt from the sonnet by the court poet Bernard Bellincioni (from 1493) and the correspondence between Cecilia Gallerani and Duchess Isabella d'Este. In 1498, the Duchess borrowed Leonardo's portrait from Cecilia.
Some researchers also noticed that the Greek word for an ermine – gale – echoes the first two syllables of the Cecilia's last name, which further supported Bołoz-Antoniewicz's suspicion. Henryk Ochenowski returned to it in 1919, pointing out that an ermine may also be a reference to Duke Ludovico Sforza, who sometimes went by the name ermellino, i.e. an ermine. Years later, in 1990, this theory was further developed by Carlo Pedretti, who linked the duke's nickname to the title which the King Ferdinand I of Naples awarded him in 1488 – The Order of the Ermine. An ermine, an ancient symbol of purity, also appeared in Leonardo's drawing (ca. 1490), which, according to Pedretti, was to function as a sketch for Sforza's medal. The drawing showed a hunter chasing an ermine, which however doesn't escape from him, as it prefers to be captured rather than step into a muddy puddle. The piece was probably supposed to be complemented by the motto malo mori quam foedari (Death Before Dishonour), which appeared next to an ermine in other emblems, e.g. of Federico da Montefeltro, Duke of Urbino, who, like Sforza, was a knight of the Order of the Ermine.
The bright and beautiful Cecilia Gallerani, who came from a non-aristocratic Milanese family, appeared in Ludovico il Moro's court in early 1489. She soon became the duke's official lover, who had long been formally betrothed to Beatrice d’Este, the younger daughter of Ercole, the Duke of Ferrara. On 16th January, 1491 Ludovico and Beatrice got married, and soon afterwards, on 3rd May, 1491, Cecilia Gallerani gave birth to Ludovico's son, who was given the name Cesare. On this occasion, the Duke presented Cecilia with the Saronno grounds and had her and the child stay for few more months at the court, which caused much embitterment. Eventually, at the insistence of his wife and father-in-law, he decided to marry his lover off to Ludovico Carminati dé Brambilla, Count Bergamino and relocate her and their son to the lavish Carmagnola palace, a gift for the little Cesare. Cecilia Gallerani died in 1536, at around the age of 63, as prominent poet, writing in Italian and Latin, praised by the novelist Matteo Bandello, as gran lume della lingua italiana (the great light of the Italian language). Sadly, her poetry has not been preserved.
The pictured animal, from the family of mustelids, but different from a tiny and untameable ermine, has also been also a subject of study. In Leonardo's painting, it functions predominantly as an emblem, alluding to both the Duke Sforza, called ermellino (the ermine), and to his lover, whose last name, Gallerani, could be associated with the animal's Greek name, gale, and – according to most researchers – can only be an ermine in order for its presence to make sense in this allegorical portrait.
In the early 21st century, yet another theory concerning the mysterious animal appeared. Krystyna Moczulska from the Princes Czartoryski Museum associated the painting with the myth about the dramatic birth of Heracles – the son of Zeus and the mortal woman Alcmene – described in Ovid's Metamorphoses (Leonardo da Vinci was familiar with Metamorphoses – he even attempted to translate them).
Upon the order of Hera, Zeus' wife, the birth of the baby was disrupted by the goddess Eileithyia. Galanthis, Alcmene's young maid, nevertheless managed to trick Eileithyia, thus aiding Heracles' birth. The infuriated goddess turned the maid into a weasel in revenge – Galanthis became gale. As Ovid wrote, her hands turned into animal paws.
In Leonardo's painting, the ermine's front paw, which can be seen in its entirety, is atypical for mustelids, however it's certain that the painter was familiar with these creatures. If the myth about Galanthis indeed bears a relationship to the story of Cecilia, through her surname, it could mean that the model was expecting when the painting was being created, and Leonardo encoded this fact into his artwork. He painted Cecilia in a way that concealed her state (showing her half-figure), because the essence of this painting wasn't pregnancy, but the representation of Ludovico's lover as an ideal of beauty – chosen and cherished by the ruler, expecting a son with whom he hadn't thus far been blessed.
After Cecilia Gallerani's death, her portrait vanished for several centuries, only to reappear around 1800 in Poland.
Lady with an Ermine has been subjected to several in-depth conservation studies, conducted in turn by: Rudolf Kozłowski (1952), Kazimierz Kwiatkowski (1952-1955), David Bull (1991-1992), and Pascal Cotte with Jean Penicaut (2007). Their combined research confirmed the authenticity of the piece as well as Leonardo's authorship, which at the turn of the 20th century was occasionally doubted (attempts were made to attribute it to Ambrogio de Predis and Giovanni Antonio Boltraffio, for example). They also enabled the verification of the actual state of the painting, which, despite having been painted over, turned out to be one of the best preserved works by da Vinci. The majority of its key parts (the model's face, the animal) were not changed.
The painting constitutes a significant achievement in modern portrait painting. Painted by a renown scientist, a thorough researcher of nature, possessing deep knowledge about the physics of light, human and animal anatomy, as well as psychology, and a proficient painter, it was an absolutely ground-breaking work at its time.