There are several reasons why a car would start and then shut off immediately. It could be battery cables, a fuel problem, or even a bad spark plug.
Could be a clogged or partially clogged fuel filter, and/or the fuel pump itself. The asker doesn't say whether the car will restart immediately after is stalls or not.
1991 mitsubishi eclipse 2.0L starts 2 to 3 seconds later shuts off
96 olds 88 runs for 20-30minutes shuts off wait 10 minutes starts up
The alternator is most likely the problem
My car starts but it shuts off it says ck engine
The Ford F150 cranks and immediately stalls and shuts off. It will crank again, but it shuts off. The guages move back and forth also
Only if you shut it off. :)
while driving along the car shuts off up on stepping on gas pedel the car re starts
Partially clogged fuel filter or weak fuel pump. Replace the fuel filter.
Sounds like your theft deterent system is engaged; for that you will need to go to the dealer (tow car to dealer). My 1996 had the same problem. They will have to replace the module in the dash or re-work it.
Replace blower motor it's burned up.
Your motor is not getting fuel. Check that the shut off valve is on .Change fuel filter if that dose not solve problem get cab cleaned