As was mentioned, check pushrods/rockers (and the manifold for vacuum leak), but it could also be cam walk. You can fix that with the cam buttuon and timing cover off an early 4.0L. '87 to '90 (and also grab the exhaust header while you're at it) A crack or carbon track in the dist cap or ignition module about to die will do weird things too. On my '83 Cherokee, I took a good running motor from my Eagle and put it in, then when I tried to start it, it backfired and wiped out the starter (broke the nose off!) Previous owner of the Jeep had put a brand new 258 in, and broken 3 starters and gave up on it. I slapped the module from my Eagle in along with one of my spare starters and it fired right up!