Keith is shot and killed by a drunk and angry Dan in the season 3 finale. While the gunshot is accidental, Dan's actions were driven by his hatred for Keith and his desire to protect his own son, Nathan, who was also present at the scene.
Dan's actions lead to a long and complicated path of guilt, revenge, and redemption for both Dan and Nathan.