Did Hagrid get killed?
He doesn’t die. Hagrid never dies in Harry Potter. Unknown. All we know is that he is still at Hogwarts in his cabin even if he’s more than eighty years old, which the trio’s kids still visited him.
What happened to Hagrid at the end?
Hagrid did not die in the Deathly Hallows. After being captured he was held in the Forbidden Forest until Harry came to surrender himself to Lord Voldemort. Hagrid yelled at Harry to run while he still can, but Harry stayed since he came to sacrifice himself to Lord Voldemort in order to save everyone else.