TL;DR
No, never. Regular dish soap produces far more suds than a dishwasher is built to handle, and the overflow can push water out through the door and onto your floor.
This is one of those mix-ups that seems harmless until the suds start pushing through the door seal and spreading across the kitchen floor. Dish soap and dishwasher detergent look similar sitting under the sink, but they're built on completely different chemistry.
The difference isn't about cleaning power, it's about foam. Dishwashers are sealed, low-water machines that were never designed to contain the kind of bubbles dish soap creates by hand.
Why dish soap causes an overflow
Dish soap is formulated to create heavy, long-lasting foam because that's what makes hand washing feel effective against grease. Dishwasher detergent, by contrast, is a low-foam or enzymatic formula designed to clean through water pressure, heat, and chemical action, not suds. Inside a sealed dishwasher, dish soap's foam has nowhere to go; it builds up with every spray arm rotation, pushes against the door gasket, and eventually forces sudsy water out through any gap it can find, often across the entire kitchen floor within minutes of the cycle starting.
What to do if you already used it
Stop the cycle immediately if you catch it early, ideally the moment you see suds pooling at the door. Open the door carefully, scoop out as much foam and standing water as you can with a cup or ladle, and mop up any water that's already escaped onto the floor before it spreads further. Running a rinse-only or short cycle a few times afterward, checking each time for lingering suds, usually clears out what's left inside the machine.
What's actually safe to use instead
Use detergent made specifically for dishwashers: pods, powder, gel, or tablets, all formulated for low-suds operation. In a genuine emergency with zero detergent on hand, running the dishwasher empty of any soap on a hot cycle is safer than substituting dish soap, though dishes won't come out as clean. Baking soda in small amounts is sometimes used as a very light-duty stopgap for barely-soiled dishes, but it's not a real substitute for dishwasher detergent on greasy loads.
Why this matters beyond the mess
Beyond the floor cleanup, excess suds can strain the dishwasher's pump and push water toward electrical components that were never meant to get wet, since the machine's entire cycle assumes low-foam conditions throughout. A one-time accident cleaned up quickly usually causes no lasting damage, but repeating the mistake, or not catching it fast enough, raises the odds of an actual repair bill. Keeping a backup box of dishwasher tablets on hand is the easiest way to make sure you're never tempted to grab the sink bottle in a pinch.
Dish soap belongs at the sink, full stop; the two products aren't interchangeable no matter how similar the bottles look. If you're out of dishwasher detergent, run the load with plain water rather than reaching for dish soap.