An engine misfire is unlikely to cause that scenario. You need to know what the codes are, but there is more to this. A professional scan tool computer can diagnose the reason. A small hand held scanner is not enough. The pro version can record what happens to make it turn off.
https://www.google.com/search?q=auto+electrician+near+me
..