Sounds to me like one of the spark plug wires isn't fully seated. I would check both ends of each cable and make sure they're fully seated.
The engine code it produced should give you some idea where to start:
- P0300 - Random or multiple misfires
- P0301 - Misfire on cylinder 1
- P0302 - Misfire on cylinder 2
- P0303 - Misfire on cylinder 3
- P0304 - Misfire on cylinder 4
- P0305 - Misfire on cylinder 5
- P0306 - Misfire on cylinder 6
If the code is P0300, it could be many things, but usually indicates a compound problem such as improper firing order or multiple unseated plug wires among others. If the error is cylinder specific, check that spark plug (the plug wires are usually numbered if you don't know which is which).
Facing the engine from the front:
1, 3, 5, are on the left, front to back.
2, 4, 6, are on the right, front to back.
If you find one that's improperly seated, check them all, just to be safe.