Do you have an aftermarket alternator? its very common for an aftermarket or an aftermarket reman to go bad instantly. they are notorious for that.
If it is an alternator your (battery light/charging system)will be on indicating that there is a foul in the charging system.
A bad cell in your battery can cause this issue. Bad cells in batteries wreak havoc on electrical systems.
Also check for a scale type build up between your terminal end and battery post. ive only seen this on a focus and never on any other car. it was on mine and my car would shut off when i was driving. it was like a brownish clear color that was extremely hard. it wasnt corrosion.