A teenage girl lives with her old uncle or grand-uncle. She started seeing little fairylike people with translucent wings about the size of a finger who moved very fast and suddenly became one of them. They, the good leaf people, inhabit a forest kingdom. However, the kingdom is under threat from evil stone people, who cut down trees and turn pleasant meadows into dirty bogs. They can also fly. The queen herself was killed by a pair of stone people on brooms, who fired a stone arrow at her, although the king killed one of them. The girl must now try to save the kingdom and return to her uncle somehow.
I'm pretty sure you're thinking of the 2013 animated movie Epic. You've described the start of the movie quite well:
16-year-old Mary Katherine, or M.K., moves in with her eccentric scientist father Professor Bomba, who has been searching for tiny humanoid soldiers called Leafmen. They protect the forest near where Bomba lives from wicked creatures called Boggans and their malevolent leader Mandrake. An independent young soldier named Nod decides to quit, much to the ire of the no-nonsense Leafmen leader Ronin.
The fairy queen of the forest, Queen Tara, must choose an heir to her throne and goes out to a field of leaf pods on board her flying barge and escorted by the Royal guards, arriving at the field guarded by a laid-back slug named Mub and a wannabe Leafman snail named Grub. Immediately after she chooses a pod, the Boggans attack. Tara flees the area with the pod, and though flying Leafmen bodyguards do their best to protect her, they are soon overwhelmed by the sheer number of Boggans. Unable to reach the barge and the safety of the Guards, while being chased, Ronin arrives for her and the pair fly off on his hummingbird mount. They are then attacked by Mandrake and his son Dagda. Dagda is killed by Ronin, but the former shoots Tara beforehand.
Meanwhile, M.K. decides to leave after having an argument with Bomba about his research. Before she can leave, Bomba's dog Ozzy runs into the woods. While looking for Ozzy, M.K. sees Tara falling. Dying, Tara gives her the pod and uses her magic to shrink her. She tells M.K. to take the pod to Nim Galuu, a glowworm wizard, before she dies, and M.K. joins Ronin and the Leafmen, along with Mub and Grub.
Wikipedia plot summary
M.K. is then on a quest to get the pod to safety to preserve the forest and to get back to her normal size.