This is the unofficial anthem of Dublin, Ireland. There is even a statue of Molly Malone in Dublin.
There is no evidence that the song is based on a real woman, of the 17th century or any other time. The name “Molly” originated as a familiar version of the names Mary and Margaret. While many such “Molly” Malones were born in Dublin over the centuries, no evidence connects any of them to the events in the song. Nevertheless, the Dublin Millennium Commission in 1988 endorsed claims made for a Mary Malone who died on June 13,1699, and proclaimed June 13th to be “Molly Malone Day”.