Are Maggots Good for Soil? | What to Do About Them

If you have ever had the misfortune of discovering maggots crawling around on your kitchen floor and realizing that the source is your kitchen garbage can, I’m sure your reaction would be the same as mine…disgust along with a hasty effort to get them out of the house. However, if you happen to find them in your garden or compost, would they be helpful or harmful?

Maggots are usually good for the soil and are very helpful in creating rich, nutritious compost to add to your garden soil. The exception is vegetable root fly larvae which are harmful to plants but can be controlled with pesticides. A common beneficial maggot is larvae from the black soldier fly.

Even though maggots are disgusting things and not your favorite sight to see in the house, most of the time you should be happy when they are found in your compost or soil. Now, let’s dive a bit deeper into the subject and answer a few remaining questions that you might have.

Types of Maggots in Soil

There are a couple of different types of maggots we need to talk about:

  • Black Soldier Fly Larvae
  • Vegetable Root Fly Larvae.

Black Soldier Fly Larvae

There are the larvae of the Black Soldier Fly (Hermetia illucens), which are found all across the United States and in most countries around the world. They are very similar to a wasp but are sleek, only have two wings while wasps have four, and are not harmful because they do not have a stinger. These adult flies can range in color from yellow, green, black, and blue, to even having a metallic color. The flies seek out and are attracted by decomposing plant and animal waste.

These flies lay their eggs in the moist organic matter, and in about four days when the larvae hatch, they are a dull whitish color and are “insatiable eaters.” It takes approximately two weeks for the maggots to complete their development and leave their feeding site to find a dry, sheltered area to begin the pupation stage, which lasts about two weeks, at which time they emerge as adult Black Soldier Flies, and the process repeats itself. 

At the end of the pupation stage, adult Black Soldier Flies do not feed but live off stored fats from the larval stage. During the larval stage, though, the “maggots” have the potential of transforming organic waste into rich fertilizer. And even though these maggots are very efficient at turning decomposing plant and animal waste into rich fertilizer for your garden, you will not usually find them in your garden soil unless you have plowed rotting straw, animal manure, or other plant and animal waste into your garden soil for fertilizer.

Vegetable Root Fly Larvae

The larvae of the Vegetable Root Fly, however, are not suitable for your soil and can cause extreme damage to your plants if allowed to flourish. The adult flies lay their eggs in the soil. Then, the larvae or maggots hatch and attach themselves to and feed on your garden plants, particularly legumes (beans and peas) and cruciferous plants (cabbages, turnips, broccoli, etc.). After the larvae eat their fill, they come to the surface to enter the pupation stage, during which they transform into adult flies, and the cycle starts all over again.

If you have plants that suddenly wilt and die, chances are that when the plants are pulled up, there will be maggots attached to the roots. If so, the plants should immediately be destroyed or placed in the trash, not composted. There are organic and chemical pesticides that can be used to stop these larvae from ruining your entire garden.

Why Are There Maggots in My Compost?

Flies lay maggots in compost because they are attracted to decomposing plant and animal matter. As a matter of fact, the larvae of Black Soldier Flies feed off this rotting organic matter and quickly turn it into rich fertilizer to add to your garden soil.

They are one of nature’s efficient recycling plants for the conversion of dead things into soil-building fertilizer.

Are Maggots Good For Soil?

The maggots or larvae of Black Soldier Flies are good for soil because of their work recycling decomposing plant and animal matter into rich soil-building compost. These maggots will not be nibbling on your garden plants but will be busy feeding on any hay, manure, or other decomposing organic matter that you may have added to your soil as fertilizer.

Can Maggots Live in Soil?

Maggots can live in the soil until they are ready to enter the pupation stage, at which time they come to the surface of the soil to dry. The maggots you usually see in the soil are Vegetable Root Fly maggots, which spend their lives in the ground attached to and feeding off your garden plants.

How Can Maggots Get Into Compost?

Black Soldier Flies are attracted to decomposing plant and animal matter. They fly into the compost and lay their eggs directly into the compost material. When the eggs hatch, the larvae, better known as maggots, emerge from the eggs to live their entire lives as larvae (about two weeks), feeding on the rotting compost material. 

They then crawl from the compost to find a sheltered, dry place to enter the pupation stage of their life cycle, during which they transform into adults.

What Do You Do if You Have Maggots in Your Compost?

Having maggots in your compost is beneficial because they speed up the process of transforming this decomposing plant and animal matter into rich fertilizer for your soil. However, if you would like to rid your compost of these slimy little creatures, there are a few things you can do.

  1. Add more dry ingredients: A successful compost consists of wet materials and dry materials. The dry materials consist of shredded paper and cardboard and lawn trimmings such as dry grass and leaves. Since flies like the wet material in the compost bin to lay their eggs in and maggots need a moist environment to live in, you can discourage them by adding more of the dry ingredients to your compost, thereby making the environment dryer and less attractive to the flies. 
  2. Cover your compost bin: Completely line or cover your compost bin with a screen so that the flies cannot get into your bin to lay eggs. If there are no eggs, there will not be any maggots. 
  3. Cover your food scraps: Cover all your food scraps completely with several inches of dry materials to make it harder for the flies to get to the food scraps in the compost bin.

Current Research on Black Soldier Flies and Their Larvae

According to the National Center for Biotechnology Information (NCBI), research is currently underway to study the future use of insects as a food source for humans and animals. In fact, humans in certain cultures have been using insects for food for many centuries.

Black Soldier Flies are being studied because their larvae are “42% crude protein and 29% fat, although they are higher in saturated fats than most insects.” This article also states that “their biggest advantage over other insects is their ability to convert waste into food, generating value and closing nutrient loops as they reduce pollution and costs.” But, this advantage also creates their greatest disadvantage because “the social stigmas and legal prohibitions against eating organisms that eat waste are added to extant taboos facing insect consumption.”

I don’t know about you, but this doesn’t sound very appetizing to me! However, if there are ever worldwide food shortages, who knows what humans will eat to survive.

Final Thoughts

Maggots are highly beneficial to your compost bin in breaking down the composted material quickly and efficiently to provide a nutrient-rich fertilizer for soil-building in your garden area. However, if you see them in your garden, find out as quickly as you can whether they are the larvae of the Black Soldier Fly or the Vegetable Root Fly, sometimes called the Cabbage Root Fly. 

If they are, in fact, the larvae of the Black Soldier Fly, then all is well. They are just feasting on the decomposing plant and/or animal matter, such as manure or rotting hay, and will produce a supply of nutrient-rich soil for your growing plants. They can be depended upon to enrich the soil, not destroy your plants.

However, if they are the larvae of the Vegetable Root Fly, pull up and destroy the affected plants and treat the soil immediately to avoid losing your entire crop. And don’t forget, either burn the plants or throw them into the garbage. Please do not put them into your compost, or it will be unusable.

I hope this article has been helpful. Thanks for reading!

Jelly Grandma

For more, don’t miss The 5 Easiest Vegetables to Grow in Poor Soil.

Anne James

Anne James has a wealth of experience in a wide array of interests and is an expert in quilting, cooking, gardening, camping, mixing drinks (bartending), and making jelly. Anne has a professional canning business, has been featured in the local newspaper as well as on the Hershey website, and has been her family canner for decades. Anyone growing up in the South knows that there is always a person in the family who has knowledge of the “old ways,” and this is exactly what Anne is. With over 55 years of experience in these endeavors, she brings a level of hands-on knowledge that is hard to surpass. Amazingly, she doesn’t need to reference many resources due to her vast wealth of experience. She IS the source. Anne wants nothing more than to pass on her extensive knowledge to the next generations, whether that be family or anyone visiting her website, her YouTube channel, or

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts