2003 malibu with high pitched knock and throwing a p0300 code. on 2003 Chevrolet Malibu

Car started making a pingy knock noise and performance went way down but we shut it off pretty quick

Asked by for the 2003 Chevrolet Malibu
Filled the gas tank recently? IF so, are you sure you put GAS in it and not diesel? Just one possibility that happens fairly often and can cause the same results!
Ouch. Yeah. I've definitely seen this. When exactly did this start? Was it all of a sudden? Had you refueled or done any type of maintenance service right before this happened? How long had you been driving? What was the temp guage reading? What were the weather conditions at the time? When you say the performance went way down, what exactly do you mean? Surging? Cutting out? Stalling? Lack of power? No RPM increase while pressing on gas pedal? More details would help us to give you better "armchair" diagnosis. Just FYI - The late 90's and early 2K's V-6 engines had some catalytic converter issues. Your cat converter may have "gone south" and is causing too much back pressure. Reccommend you take it to a shop and have it looked at unless you're car savvy and have a scanner and an exhaust back pressure tester.
1 more answer , 1 more comment
What engine does it have? Big difference in design between 4 cyl and 6 cyl.
It has the 3.1