2000 Nissan Maxima - rattle when climibing hills

I hear a rattle under the car when I accelerate uphill. Can’t figure out a pattern, other than it only (but not always) happens when I press the accelerator going uphill. Automatic transmission. Only 30K miles, but 8 years old. Any ideas what’s wrong?

It sounds like the EGR system is caked up with crud. The EGR system is designed to hold down NOX emissions AND lower combustion chamber temps. If the EGR is inoperative or caked up the comb. chamber temps will rise and this will cause your pre-ignition rattle.
The vehicle has very low miles for its age so this signifies a lot of short hop driving. This type of driving can contribute heavily to a problem like this.

I would advise having the EGR system checked and parts replaced as needed. Depending on the exact cause, sometimes simply removing the EGR and scraping the old deposits out will help.
You could also try running a can of SeaFoam through an intake manifold vacuum line and see if that clears it up.
Hope that helps.

Rattle UNDER your car?-- could just be something loose in your exhaust system. Going uphill puts more stress on the engine, causes more vibration throughout the car- and makes itself heard in a loose exhaust hanger or clamp or something.

If you accelerate hard on a flat road (getting the rpm’s up to 3 or 4k) any sound of it then?

Sometimes it can be difficult to determine exactly where a noise is coming from, and I believe that it is coming from under the hood, rather than underneath the car simply because you have described the classic symptoms of pinging/knocking/pre-ignition.

As ok4450 has mentioned, a gummed up EGR could be causing the engine to ping under load. Other possible causes are carbon deposits in the cylinders or timing that is too far advanced. But, since timing is probably not adjustable on that engine, we can probably rule out timing as a cause of the problem.

Bear in mind that pre-ignition noise means that your engine is being damaged in some very expensive ways at this point every time that you climb a hill. Soon, you will probably also hear the noise if you accelerate strongly on a flat surface. Before your engine is further damaged, I suggest that you get the car to a qualified mechanic for cleaning or replacement of the EGR and/or decarbonizing of the engine. If you have not had the spark plugs replaced within the past few years, you should consider having that done also.

check the heat shield around the catalytic converter.