How to Get Rid of Millipedes After Heavy Rain

About 3 inches of rain falls in 24 hours and suddenly your basement floor is moving. Not because of flooding — because hundreds of millipedes are streaming through every crack and gap they can find. Here’s the thing most people get wrong: those millipedes didn’t come inside because of the rain. They came inside because the rain made your yard uninhabitable for them — and your home, by contrast, was dry. You’re not dealing with an infestation. You’re dealing with a mass evacuation, and that distinction changes everything about how you fix it.

Why Do Millipedes Flood Into Houses After Heavy Rain?

Millipedes breathe through tiny pores along their body segments, which means they need moisture to survive — but not too much moisture. When soil becomes completely waterlogged after a heavy storm, it fills every air pocket that millipedes rely on for movement and respiration. They can’t survive submerged in saturated ground, so they do what any sensible creature does: they move toward higher, drier ground. Your foundation, crawl space, and basement walls are the first dry surfaces they hit.

This is why you’ll often see the worst invasions within 12 to 24 hours of a major rain event — not during it. The soil hits saturation, millipedes start migrating en masse, and they follow the path of least resistance: gaps around pipes, cracks in the foundation, basement windows, and door sweeps that don’t seal tightly. A single storm can push hundreds of millipedes into a home that has never had a problem before. They’re not breeding inside your walls. They’re refugees from a flooded yard.

get rid of millipedes after heavy rain close-up view

This close-up shows the typical millipede body structure you’ll see during post-rain invasions — note the cylindrical segments and paired legs, which help distinguish millipedes from the flatter, faster centipede that actually bites.

What Most People Do First — and Why It Doesn’t Work

The instinct is to grab a can of spray and hit every millipede you see. That feels productive. But killing the millipedes already inside doesn’t stop the next wave from coming through the same entry points 48 hours later when the next storm rolls through. It’s like bailing a boat without finding the hole. Indoor spray treatments are a reactive measure, not a solution — and many people go through multiple cans of pyrethrin-based spray before realizing the problem keeps returning because the underlying access points were never addressed.

The other common mistake is assuming mulch is just a landscaping choice. Thick layers of wood mulch piled against your foundation are millipede habitat. They live in it, breed in it, and when that mulch gets soaked, they walk directly from it into any crack in your foundation wall. A 3-inch layer of mulch touching the base of your house is essentially a millipede on-ramp. Pulling mulch back 6 to 12 inches from the foundation — and keeping it no deeper than 2 inches near the house — does more to prevent post-rain invasions than any spray you’ll buy at a hardware store.

How to Actually Seal the Entry Points Millipedes Use

Millipedes are surprisingly flat when they want to be. They can compress their bodies and slip through gaps as small as 1/16 of an inch — roughly the thickness of a credit card. That means a hairline crack in a foundation block, a gap where a pipe enters the basement wall, or a door sweep that’s worn down in the middle are all viable entry corridors during a mass migration event. The good news is that sealing these gaps is a one-time fix that pays off every storm season.

Here’s a practical sequence for sealing a home against post-rain millipede entry:

  1. Inspect the foundation perimeter after a rain — walk the outside of your home and look for any gap wider than a business card, particularly where the sill plate meets the foundation and around utility penetrations.
  2. Use hydraulic cement or polyurethane caulk on cracks in concrete block or poured-concrete walls — silicone alone won’t bond properly to damp concrete, so wait for a dry window or use a product rated for damp surfaces.
  3. Replace or add door sweeps on any basement or ground-floor exterior door — look specifically at the corners, where sweeps almost always have a small gap even when new.
  4. Install fine-mesh screens on basement window vents — standard window screen (18×16 mesh) keeps millipedes out while still allowing airflow, which also helps prevent the damp conditions millipedes prefer indoors.
  5. Check crawl space vents for damaged screens or gaps around the vent frame — crawl spaces with torn or missing screens are one of the highest-volume entry points during rain events, and you may never see the millipedes actually come through because they disperse through the floor above.

Pro-Tip: Run a bead of foam weatherstripping tape along the bottom interior edge of your basement door threshold — it costs about $8 and closes the micro-gap that most door sweeps leave at the corners, which is where millipedes almost always actually enter.

Which Treatments Actually Reduce Millipede Numbers — and Which Are a Waste of Money

Diatomaceous earth (food-grade) is one of the most underrated tools for millipede control because it works mechanically rather than chemically — it damages the waxy cuticle on millipede exoskeletons, causing them to lose moisture and die. Dust a thin layer along the base of foundation walls inside your basement and along the threshold of any door that leads outside. It stays effective until it gets wet, so reapply after water exposure. A 4-pound bag covers roughly 400 linear feet of perimeter, and it costs around $12 to $15.

For outdoor perimeter treatment — which is where you actually intercept millipedes before they reach your home — bifenthrin-based granules or liquid concentrates applied in a 3- to 5-foot band around the foundation work significantly better than aerosol sprays. Products containing bifenthrin, cyfluthrin, or lambda-cyhalothrin create a residual barrier that stays active for 30 to 90 days depending on rainfall. One honest caveat: if you’re getting 3 to 4 inches of rain in a single event, even a well-applied perimeter treatment will be washed out within hours. In that scenario, the physical exclusion steps above matter far more than any chemical treatment.

Treatment TypeWhere It Works BestHow Long It LastsLimitation After Heavy Rain
Diatomaceous earth (indoor)Along interior foundation walls, door thresholdsUntil it gets wetMust reapply if basement floods or gets damp
Bifenthrin granules (outdoor)3–5 ft perimeter band outside foundation30–90 daysPartially washed out in major storms
Pyrethrin aerosol spray (indoor)Direct contact kill on visible millipedesHours onlyNo residual; doesn’t prevent re-entry
Physical exclusion (caulk, sweeps, screens)Cracks, gaps, vents, door bottomsYears with maintenanceNone — works regardless of rain volume

How to Fix the Yard Conditions That Attract Millipedes in the First Place

Picture this: your neighbor’s yard is thick with leaves piled against the fence, and their raised garden beds are right up against your shared property line. Every time it rains, millipedes migrate from that organic-rich habitat and run the length of the fence line until they hit your foundation. This is a scenario a lot of homeowners overlook — millipede pressure sometimes comes from adjacent properties or shared green spaces, not just from your own yard. You can’t control your neighbor’s mulch habits, but you can create a dry gravel or rock buffer zone along your own foundation that’s genuinely inhospitable to millipedes.

Yard drainage matters more than most people expect. Millipede populations are highest in low-lying areas where water collects after rain — and if that low spot happens to be right against your foundation, you’re going to see recurring invasions regardless of what products you apply. Grading soil away from the house at a slope of at least 1 inch per foot for the first 6 feet, or installing a French drain to divert runoff, directly reduces the waterlogged conditions that trigger millipede migration. It’s a bigger fix, but it addresses the root cause rather than just the symptom. Some of the same moisture and organic debris conditions that attract millipedes also attract other secondary pests — similar to how larder beetles in the kitchen often follow the presence of another pest they’re feeding on, millipede issues near the foundation are frequently a sign of broader moisture mismanagement around the house.

“Most people focus all their energy on killing the millipedes they can see, but the real fix is environmental. Millipedes are moisture-dependent, so any yard modification that reduces pooling, saturated mulch, or decomposing leaf litter near the foundation will do more than any pesticide application. Post-storm invasions are a symptom of a landscape that isn’t draining correctly — address the drainage and the invasions become rare events instead of seasonal guarantees.”

Dr. Ellen Vargas, Ph.D. Urban Entomology, University Extension Pest Management Specialist

Beyond drainage, here are the specific yard conditions to eliminate if you want to stop millipedes from building up in large numbers near your home:

  • Leaf litter against the foundation — rake it back at least 10 to 12 inches; decomposing leaves are prime millipede habitat, and wet leaves are especially attractive
  • Mulch deeper than 2 inches near the house — keep it thin and pulled away from the foundation wall; consider switching to rubber mulch or decorative stone within 12 inches of the structure
  • Rotting wood near the foundation — old stumps, woodpile logs stacked against the house, and deteriorating railroad ties all harbor millipedes year-round
  • Dense low-growing ground cover pressed against the house — ivy and similar plants hold moisture against the foundation and create shaded, humid corridors that millipedes actively seek out
  • Gutters that overflow or dump near the foundation — extend downspouts at least 4 to 6 feet from the house so that roof runoff doesn’t pool against the structure during and after storms

One counterintuitive insight worth knowing: millipedes actually play a beneficial role in yard ecosystems by breaking down organic matter and improving soil. The problem isn’t that you have millipedes in your yard — it’s that you have conditions allowing them to build up in large enough numbers that mass rain-triggered migrations become inevitable. A yard with good drainage and modest organic debris will still have millipedes; it just won’t have the kind of population density that sends hundreds of them indoors every time a storm passes through.

It’s also worth noting that post-rain pest pressure isn’t unique to millipedes — other moisture-sensitive pests use the same entry points after heavy storms. If you’ve dealt with something like bird mites after a nest removal, you already know how unexpected secondary pest invasions can feel: they seem to come from nowhere, they use the smallest possible gaps to get in, and they stop when the underlying condition is resolved. The fix is almost always about closing entry points and eliminating the source condition, not just reacting to what’s already inside.

Once you’ve sealed the entry points and corrected the yard drainage and organic debris issues, you’re essentially done — not just for the next storm, but for every storm after it. The millipedes in your yard will always respond to heavy rain by moving upward and outward. The only variable you control is whether your home is accessible to them when they do. Tighten that up once, and you won’t be sweeping millipedes off your basement floor the morning after every major rain event for the rest of the time you live there.

Frequently Asked Questions

why do millipedes come inside after heavy rain?

Millipedes move indoors after heavy rain because saturated soil forces them to find drier ground. They’re not looking for food — they’re just escaping waterlogged conditions. Once the soil dries out, most of them will die off or head back outside on their own within a few days.

what kills millipedes instantly inside the house?

Pyrethrin-based sprays kill millipedes on contact and are available at most hardware stores. You can also use diatomaceous earth along baseboards and entry points — it damages their exoskeleton and dehydrates them within 24 to 48 hours. For a quick fix without chemicals, a vacuum works fine for picking up large numbers at once.

how do I keep millipedes from coming under my door after rain?

Install a door sweep on any exterior door with a gap larger than 1/16 of an inch — that’s enough space for millipedes to squeeze through. Sealing cracks in your foundation with caulk and adding weatherstripping to garage doors also cuts off their main entry points. These fixes work for other moisture-seeking pests too, so they’re worth doing regardless.

how long does a millipede infestation last after rain?

Most post-rain millipede invasions clear up within 1 to 2 weeks once the outdoor soil dries out. If you’re still seeing large numbers after that, there’s likely a moisture problem inside your home — think leaky pipes, poor drainage, or damp mulch sitting right against your foundation. Fixing the moisture source is what ends the cycle long-term.

what to put around the outside of house to stop millipedes?

A barrier treatment with a residual insecticide containing bifenthrin or cyfluthrin applied around your foundation, up about 3 feet, is one of the most effective outdoor options. Pull mulch at least 6 inches away from your foundation since it holds moisture and gives millipedes a place to breed. Spreading diatomaceous earth or a granular insecticide along the perimeter adds another layer of protection after heavy rain events.

Disclaimer: This article is for informational purposes only and isn’t a substitute for professional pest control advice. Always read and follow the product label instructions exactly — label directions are legally binding and vary by brand and active ingredient. Keep all pesticides, baits and traps away from children and pets, ventilate treated areas as directed, and consider calling a licensed pest control professional if an infestation is large, recurring, or involves a structural pest like termites or carpenter ants.