The relationship that Albus Dumbledore had with Severus Snape was a difficult one to understand. Although they were friends of sorts, we can clearly see that Dumbledore used Snape for the greater good.
However, Snape did something to Dumbledore that everyone else condemned until they learned the whole truth behind the deed, and we had to wait until almost the very end to find out.
Contents
Did Snape Kill Dumbledore?

Yes, Snape killed Dumbledore.
Although Snape was a Death Eater, he didn’t want to kill Dumbledore at first, being sardonic and making sarcastic comments when Dumbledore told Snape he must do it.
He had doubts about his soul, but in the end, he agreed to “help an old man avoid pain and humiliation.”
Why Did Snape Have to Kill Dumbledore?
There were three reasons why Snape had to kill Dumbledore. One of them was that Dumbledore was already dying.
Dumbledore had a mission to hunt down and destroy Horcruxes. He had success with one of them, the Ring of Marvolo Gaunt. Unfortunately, the Ring was cursed, and Dumbledore, tempted to use the stone embedded in the Ring, put it on.
The curse was a deadly one, and with the help of no other than Severus Snape, Dumbledore could prolong his life a little bit.
Knowing Voldemort’s plans for Draco, Dumbledore asked Snape to kill him. He knew that it would be down to Snape to finish the job in case of Draco’s failure.
The second reason was to protect Draco. Dumbledore and Snape both knew that Draco would fail in killing Dumbledore, but all the same, knowing what killing a person can do to a wizard’s soul, Dumbledore didn’t want Draco’s soul to be ripped apart on his account.
He preferred Snape to step up and do the job rather than have someone like Greyback the Werewolf or Bellatrix Lestrange do the deed. His argument was that he would like a “quick, painless exit to the protracted and messy affair.”
The third reason is that Voldemort was expecting Snape to kill Dumbledore. He did not believe that Draco would pull through with the mission, and therefore his plan, from the beginning, was for Snape to prove himself to Voldemort and kill Dumbledore, taking over the school.
Both Dumbledore and Snape knew of Voldemort’s plans for Snape, and they discussed it when Snape, ironically, tried to save Dumbledores life after a curse from Marvolo’s Ring struck the old wizard.
“In short, the boy has had a death sentence pronounced upon him as surely as I have,” said Dumbledore. “Now, I should have thought the natural successor to the job, once Draco fails, is yourself?”
There was a short pause.
“That, I think, is the Dark Lord’s plan.”
Snape had to stay in Voldemort’s good graces to continue the work as a spy. Even though he would no longer pass the information to the Order of the Phoenix, he still had a task from Dumbledore to protect the school and all the students from merciless Carrow siblings.
Why Did Dumbledore Beg Snape Not to Kill Him?
When we first read the end of chapter twenty-eight of Harry Potter and the Half-Blood Prince, we thought Dumbledore begged Snape not to kill him. It made sense at the time when Dumbledore said Snape’s name. He was pleading.
After the big reveal in book number seven, after seeing Snape’s memories in chapter thirty-three, we learned that Snape promised to kill Dumbledore.
We can assume then that Dumbledore merely begged Snape to keep his promise and perform the killing curse to save the old wizard from pain.
From Harry’s point of view, we could see that there was hatred and revulsion on Snape’s face, and at the time we read it, we could only guess it was directed towards Dumbledore, but once again, those emotions come clear to us after The Prince’s Tale.
We understood that those emotions on Snape’s face were to fool everyone. Snape, whose face was usually an emotionless mask, showed us the emotions he felt for himself for agreeing to kill his only ally, the only person who knew his real character.
Conclusion
Through the six books, J.K. Rowling lets us believe Snape to be the villain and made him the man who killed Dumbledore in cold blood.
The reveal at the end of the last book brought tears to our eyes when we learned that Snape had to kill Dumbledore to protect Draco and stay by Voldemort to play the role and protect the school, and the two of them planned it a year in advance.
The reasons why Snape killed Dumbledore are noble, and he tried to do the right thing by Draco, the school, and Dumbledore himself.