Just a guess, but I have seen where the alternator wiring is messed up, so you get a power feedback keeping the ignition energized even when the key is off. To test this, unplug the plug on the alternator. With this plug disconnected, the car is running entirely off the battery(be careful driving it like this, since your battery will go dead with no charging system). If it still does it, it's not alternator feedback.
Until you get it figured out, shut the car off with it in gear. Since you say it is already running rough when it does this, the extra drag might be enough to cause it to die.
Disclaimer: Any hokey-assness on my personal vehicles does not reflect the quality of my work done while I'm on the clock