From your description of the sound and when it occurs, I think you are reffering to "detonation," aka "spark knock" or "ping". It seems to be a fairly common condition on the 4.0 OHV engine, especially the early ones. Search this site for engine ping or something like that and you'll get a lot of stuff to read. Causes usually boil down to:
Carbon deposits in the cylinders -- need to clean them out
Dirty MAF -- computer doesn't "see" all of the air going in causing the engine to run lean.
Vacuum leak -- also causes engine to run lean
lower intake manifold gasket leaking -- same as vacuum leak, just a case specific to the 4.0 OHV.
That should get you started. This is common to your engine, and has been discussed in great detail before.
Good luck.