There are two sources of engine noise in car stereos - the generator/alternator and spark plugs/wires.
The generator/alternator will give you a high pitched whine or whirl which will change frequency with the RPM of the engine. This is normally caused by AC ripple voltage (not nipple voltage that's something different) coming down the (+) cable of the amplifier. This is cured with a large choke coil attached in line with the (+) cable close to the amplifier. There are kits sold for this, some include filter caps too. Get one matched to the current demand (in amps) of your amplifier.
Sparkplug/wire noise is a popping or crackling noise. Turning to an AM radio station will make the noise worse than FM or CD/Cassette normally. This noise is caused by the high voltages on your spark wires and can be cured with the use of high quality wires or resistor wires which are sold at auto parts stores.
I use to make my living 20 years ago doing custom car stereo installations and fought both these demons weekly.
Your ground wires shouldn't be longer than a foot or so. Find a nice heavy piece of the car chassis, scrape the paint, drill a hole, and use a star washer under the screw between the ground wire lug and car body.