I'm not a mechanic so I'm sort of stumped on this. What would make sense in my mind is that the transmission is broken, and the engine knows that so when you put it into gear, the engine shuts if self off to prevent further damage. No error or warning lights are popping up in the cluster?
-Robert