I have had a few diesels...not Cummins. Here's how they generally work.
There is typically a solenoid valve in the fuel path that is opened when the engine is running. The way a diesel is stopped is that the electricity to the solenoid valve is turned off. Somehow, your solenoid valve is likely stuck open. Try unplugging the electrical connection to it. The only way to stop a diesel that has "run away" like this is to shut off the air supply. There are many inelegant ways to do this, some of which will result in items being sucked into your air cleaner.