Yes you can, I have been doing it with much success, but don't fill the bin with dirt. 1/2 fill it with shredded newspaper. The concept is called "vermicomposting". You could google "vermicomposting" or read this thread
https://www.rollitup.org/organics/53798-growing-worms.html
or
1. order some worms. "Red Wrigglers" are the best worms for composting. I bought mine from
New York Worms-Your Live Feeder Superstore. A pound or so should do.(don't use worms from you back yard !!!)
2. buy a "sterilite" or similar brand plastic storage tub.(the biggest you can find)
3. drill holes ample holes in the bottom of the bin and in the lid for drainage and airflow.
4. shred a bunch of newspaper.(don't worry about the ink, most newspapers use soy based ink)
5. wet the newspaper and wring out the excess water.
6. 1/2 fill the bin w/ the wet newspaper.
7. add a few hand fulls of potting soil. The worms need this for roughage and to help w/ digestion.(again, don't used soil from your backyard)
8. add worms
9. the worms need time to get adjusted to their new environment so don't feed for the first 7 days.
10. after the week you can start to feed them. There are things you
should feed your worms and things you
should not.(
I suggest you research to find out what these things are since they are too numerous to list here). I simply feed mine leaves and harvested plants from my garden as well as green leaf vegetables and oats. Bury the food under the newspaper. They eat the newspaper as well.
Vermicomposting is an excellent way to recycle your plants and reduces the chance of cops finding anything if they rummage through your garbage. Plus it also helps you to get rid of household food scraps.
Hope this helps you out.