Why did my headlights kill my car?

That's why I suspect the charging system
It's entirely possible.