Although it’s never particularly pleasant to have bugs in your house, it’s common to find a variety of small creatures seeking refuge in your basement when it’s been raining or just because they like the cool, damp environment. So, if you’ve found worms in your basement, how can you get rid of them? And how can you keep them out for good?
Worms and millipedes tend to enter basements to get away from flooding after rain or because they like the cool moisture of an unfinished basement. The best option is usually to wait for them to die and focus on preventing future issues by sealing any cracks or holes in the walls and using bug repellent.
Let’s take a closer look at what kind of worms end up in basements after rain, why they like basements, how to get rid of them, and how to ensure they don’t come back.
Why Are There Worms in My Basement After Rain?
Worms and millipedes love moisture, so they thrive in dark, damp places — and that often includes your basement. However, there’s another reason they end up there, particularly after it’s been raining.
Worms and millipedes usually stay below the surface of the ground, but when it rains, their burrows flood, and oxygen can’t travel through them as quickly. This pushes the worms to look for another place to go. If your basement walls or window back onto the backyard and there’s vegetation there, you’re more likely to find worms in the basement.
When the insect surface, a nearby basement is usually their best bet; it’s unlikely to be flooded by the rain but still provides the optimal conditions for a worm to thrive.
If you have a finished basement, there’s less of a chance the worms will come inside, but if your basement is unfinished and sits on a slab, then you may have some wriggly visitors headed your way.
Note: since worms like moist areas, if you have a worm or millipede infestation you should also check other areas such as the bathroom and garage.
Which Types of Worms and millipedes Are the Most Common?
There are various types of earthworms that might end up in your basement. The first thing you should do in any pest control plan is to identify the species. Incorrect identification will lead to wrong treatment plans, costing time and money.
It’s more common to find millipedes in the basement (many people mistake millipedes for earthworms), which aren’t actually worms but look a lot like them. They’re very small, and you can recognize them from the numerous legs on either side of their body.

Earthworms are relatively easy to identify as they do not have legs, and have a long, cylindrical bodies.

Millipedes in the United States grow from half an inch to two inches long, their bodies are semi-cylindrical in shape and they’re typically brown or black.
Some of the rare species may also be red or white. They have two pairs of short legs per body segment, and the actual number of legs a millipede can have usually ranges from 40 to 400.

Centipedes grow as large as 6 inches. Their bodies are much flatter and they’re usually a yellow-brown color. They have relatively long antennae, and they have one pair of long noticeable legs per body segment.
Millipedes tend to die quickly either due to a lack of moisture throughout the home or due to a lack of food sources. If you’re dealing with a millipede infestation it’s not uncommon to find dead millipedes around the home. You’ll notice millipedes have hard, outer skin and when you touch them they curl up (they also smell, I think they smell like beef jerky!).
Lastly, if the worms in your basement are found in the drain you may have found some ‘Tubifex tubifex‘. These are hardy little creatures and love stagnant water, but surprisingly can also survive draughts.
How Do I Get Rid of The Worms or millipedes?
Once you’ve identified the pest, there are a couple of ways you can get rid of worms and millipedes in your house, including the following:
Getting rid of worms
You may not like the sound of it, but one easy option is simply to wait patiently. Worms won’t be able to get back outside, nor do they have what they need to survive in your basement. Eventually, they’ll just die.
So, you can simply wait for that to happen, and, in the meantime, focus on preventative measures to ensure that no more work comes inside.
A more environmentally friendly option is to re-home your worms to the backyard. Earthworms aerate the soil in the backyard, and they excrete nutrients that many garden plants like. They are a natural and effective fertilizer and it’s a shame to put this to good waste. Unlike a basement infestation of ants, for example, earthworms are unlikely to continually multiply in numbers and cause significant issues.
Note: although earthworms are mostly good for the lawn, in too large numbers they can create too much fertilizer. If this is the case you’re likely to see yellow or brown patches under the pile of castings.
We’ll get into more proactive treatments later.
getting rid of millipedes
One gross difference between millipedes and earthworms is that millipedes can excrete an odorous liquid from their side glands. This liquid smells but it can also cause minor blisters on your hands if touched, so you should wash your hands after handling it. And therefore I’d also recommend not stomping on or crushing millipedes as it’ll make a smelly mess. On rare occasions, people can also be allergic to the liquid millipedes secrete.
Note: whilst millipedes can’t bite, centipedes CAN so be careful!
The easiest natural way to remove millipedes from your basement is to vacuum them and subsequently dispose of them outside. Or you can sweep them up and put them into a bucket of soapy water to kill them.
Use a Bug Spray or insecticide
Alternatively, if you don’t want to wait the bugs out, you can use a bug spray to kill them and get rid of them that way. This is the faster option, of course, and you can begin the process of prevention more quickly while knowing none still exist within the house.
Note: before using any kind of insecticide inside the house, you should carefully check whether the insecticide is intended for indoor usage and that it’s safe to do so.
Earthworm bug spray or insecticide
In order to kill earthworms you should use a carbamate insecticide.
Millipede or centipede bug spray or insecticide
Millipedes require a specific type of insecticide and so you should look for products specifically labeled for millipede control. Examples are Suspend Polyzone and Talstar P.
Treat both the indoors and the outdoors
Since worms and millipedes have likely entered your home through the outdoors, it’s possible you also have an infestation in your backyard. Therefore it’s prudent to treat both the lawn in addition to your basement to avoid pests returning.
Indoors – Put the treatment somewhere it won’t get disturbed such as behind appliances or along the walls beneath the furniture. You can also get general insect traps (on Amazon) that you can leave in strategic locations.
Outside – You should carefully treat any entry points to your property, including cracks in the walls. Doors, windows, and vent openings are other problem areas. Pay particular attention to treating the foundation floor of the basement. It’s far easier to keep pests outside the home than to have to treat them.
How to Prevent Worms From Entering Your Basement
The best way to get rid of worms in the basement is to prevent them from entering in the first place because they can invade in the hundreds. Here’s how to go about it:
Finish Your Basement
Worms are much more common in unfinished basements. After all, finished basements typically aren’t damp, dark spaces filled with exactly the kind of moisture worms are attracted to!
Finishing your basement can be an expensive and time-consuming project, but there are many benefits — and not just the lack of worms moving forward.
Seal Up Cracks in Doors and Windows
Make sure to seal up the doors in your basement and, if applicable, any windows. Worms can squeeze in through the smallest of spaces, and the more spaces that you manage to seal up, the less chance there is of any of the bugs getting in.
Make sure you also check for cracks between the foundation and the doorway. You can seal these up using caulk (which you can buy on Amazon).
Use a Repellant
One of the simplest fixes is to purchase a repellent (on Amazon) and spray it around potential entrances to the basement.
Even if you think you’ve sealed up every crack in the basement, worms are tiny and it’s very likely they’ve found a place where they can still squeeze through. Spraying around the edges of your house gives you another barrier of protection.
However, if you have pets, you should make sure to use a spray that isn’t toxic to them, or keep them out of the basement. Many bug sprays can be poisonous to animals. Place your repellent in places near the cracks but where your pets can’t get to them, like under a dresser or shelves.
Clear the Edges
Another prevention technique is to clear the edges around your house of any debris or wet mulch. Worms find their way into your basement because they’re attracted to the space — so if you make sure there’s no clear indication that it might be a great place for them to live, there’s a much lower chance of them finding their way inside.
You can also make sure that there are no damp spots inside the house. Worms have great senses despite the fact that they’re mostly blind, and it’s amazing what they can sniff out.
Good Hygiene
The last good tip for pests in general (not just worms) is to practice good hygiene around the house. If there’s anything that has a strong stench (and remember, animals have stronger senses than us!), then pests may be attracted to it. Make sure you clean thoroughly, take out the trash regularly, and keep up with household tasks.
As with many home maintenance issues, an ounce of prevention is worth a pound of maintenance and management: try to practice good housekeeping around your house and keep things clean, which will make issues like this rarer and easier to deal with in general.
Final Thoughts
At the end of the day, it’s very common for worms to end up in the basement. It isn’t necessarily a sign that you aren’t being clean or that something is wrong.
Nonetheless, it’s best to keep them out since they can be an inconvenience. Make sure you focus on prevention methods like sealing up the house, using repellent, and reducing dampness and mulch around the foundation so that the worms don’t have a reason to enter.