Harry witnesses Voldemort murdering Severus Snape in the Shrieking Shack during the Battle of Hogwarts. As Snape is dying, he tells Harry to take his last thoughts. When Harry returns to the castle,...
He saw Snape kill him. Also - as additional confirmation - the fact that the binding curse stopped working (that Harry Potter could move again) could only mean that the caster (Dumbledore) had died.