just fixed the same problem on mine. what i did was have the jeep dealer check it out and the said it was the crankshaft position sensor. the cps is on the drivers side, on top of the bell housing. the jeep dealer charged 94.00 to fix it, but u can get the cps at Auto Zone for 64.00.
'86 xj, 2.8, 3" lift
'94 zj, 4.0, stock (Sadly)