Three things would cause your Jeep engine to run poorly. Poor fuel, poor air, or poor spark. Check the spark plugs, check the air filter and check the fuel pressure.
Depending on the year, I would assume it is an ignition problem. If it is at least a 1996 year, I would guess that you are having issues with your crank shaft position sensor which triggers the ignition.
The problem could be as simple as a dying battery,alternator or loose wire. It may also be a security system or computer problem. You must run a full diagnostics to be certain.
You are either loosing fuel supply or spark. Check all of the connections to the battery and the alternator making sure they are tight this could fix a spark problem.