Kakashi is a powerful man. A man of character and wit. He had everything it takes to become a Hokage, atleast we thought, yet he gets killed in the anime. How did Kakashi die?
Kakashi was killed by PAIN when he tried to protect Choji. Even though, he died he came back tom life later on when PAIN revived everyone who had fallen victim to his large scale attacks.
To answer this question, we need to go back in time and get some context.The Akatsuki were capturing tailed beasts one after the other. There was no stopping them. During the course of this, they lost many of their core members, but it didn’t matter much as they had already captured the remaining tailed beasts, or so they thought. Killer Bee fooled Sasuke and Taka.
Naruto was their final target. He was a formidable enemy since he had taken down 2-3 Akatsuki members, so the leader of Akatsuki, Lord PAIN himself decided to fuck the shit out of him, not to forget he hated Konoha.
Why did Pain hate Konoha?
Pain hated Konoha because during the second great ninja war, the village hidden in the rain was used as a common battleground between villages. Due to this reason, he and many other kids were orphaned. To add to it, the shinobi who stole his parents were from Konoha. The image of his parents dying in front of him, their screams, the blood, the image was reminiscent in his brain. He couldn’t get it out. Hence, PAIN decided to get Naruto himself.
When PAIN attacked Konoha, Naruto wasn’t in the village. Naruto was in Mount Myoboku practicing sage mode. Since PAIN couldn’t find Naruto, he decided to destroy Konoha in order to bring him out and it surely did work. While he was searching for Naruto, he had to counter many shinobi. Kakashi was one of them. When Pain was about to finish Choji, Kakashi interfered and saved him so that he could deliver a valuable message to Tsunade. In order to protect Choji and the village Kakashi became a sacrifice. Kakashi was killed in an instant by PAIN.