Years ago, there were many witches and magicians in the Land of Oz. One of the things they often used in making magic charms and transformations was a six-leaved clover. When Ozma came to power, she outlawed the practice of magic and sorcery for anyone but Glinda and the Wizard of Oz. She also forbade anyone from picking a six-leaved clover.
When Unc Nunkie and Margolotte Pipt were turned to marble by the Liquid of Petrifaction, Dr. Pipt sent Ojo on a mission to collect the ingredients needed to restore them to life. One of those ingredients was a six-leaved clover. As he approached the Emerald City, Ojo saw one and picked it, and was promptly arrested at the gate of the city. He spent the night in prison and was brought before Ozma. She explained the reason for the law and forgave him because he had not understood it before. She allowed him to keep the clover, but Ojo was unable to collect one of the other ingredients, and Unc Nunkie and Margolotte were restored by another method. (The Patchwork Girl of Oz)
The Patchwork Girl of Oz (film) As in the book, Ojo goes to court after picking one.
Dorothy and the Wizard of Oz
In the episode Beware the Woozy, Tin Man picks up a six-leaf clover for the antidote to revive Ozma who was turned to stone after using the liquid that arrived as part of her "Potion of the Month" subscription without reading the instructions. In this version, it is not illegal for him to pick it up.
Once Upon a Time
The six-leaved clover has the power to transform anyone into who they wish to be. That is, it acts as a glamour spell that can make the user appear to be someone else. Robin Hood stole one during his visit to Oz. (Once Upon a Time: "Heart of Gold")
The Wicked Witch of the West later used one to take the place of Marian, Robin Hood's wife. (Once Upon a Time: "Sympathy for the De Vil")