Engine problem in Chevy Malibu

My 2005 Chevy Malibu (97,000 miles) started sounding like the motor was going to die tonight as I was idling. When I started to drive again, the motor sounded kind of noisy and the RPM’s went up and down (from 1 to 2 and back down again), and the engine light came on. The temperature gauge showed that the car was running a little hotter than usual, but not much. The gas was about half full, I have had no problems with the gas gauge. I change my oil regularly. No message came on my message panel. I can turn off the engine and start it up again just fine, but the engine still sounds bad and the light still comes on.
Any ideas?

The check engine light will have set a trouble code(s)…Most of the chain auto-parts stores will read those codes for free and tell you briefly what they mean. Write the code down and post it back here for more answers…Have you checked all the fluid levels?

@Serena

If “the engine still sounds bad” it might be wise to have it towed to the local Chevy dealer.

What do you mean by “engine light”? If the light you’re referring to is a red oil pressure lamp instead of a CEL and the engine is noisy then you’re in trouble.

The oil changed regularly statement could also lead to questions as to how long ago it was changed and if the hood has been raised since then to check the oil level.