The Little Matchgirl is an original tale by Hans Christian Andersen without any direct folkloric influence. The tale was inspired by the childhood experience of Andersen's mother. As a child, she was often sent out into the streets to beg. She, of course, lived and grew up to give birth to Andersen.
The tale has become a classic story, most popular around Christmas time for obvious reasons. Often reinterpreted in film, theatre, and books, the ending is sometimes changed to an ending in which the little match girl doesn't die, but is rescued from her cold and hunger by charitable persons.