mil light flashing, battery light on and no power on 2004 GMC Canyon

was driving down the highway today my check engine light came on flashig, battery appeared in the center and vehicle had no power. sounded like it was missing on a couple of cylinders. could a bad battery cause this

Asked by for the 2004 GMC Canyon
Bad batteries typically do not cause misfires. In this case, though, you have a charging system issue - as that is why the battery light comes on.

Repair the charging system issue first (alternator? wiring?....) and then recheck for the check engine light. On occasion I have seen where a faulty alternator can send off electrical frequencies locally under the hood that can hamper ignition system or computer operation. Best to eliminate this variable first, before going onto other things like plugs, etc.