J.K Rowling always planned for Hagrid to carry Harry out of the Forbidden Forest at the end of Deathly Hallows.....She explained that Hagrid carrying Harry at the end was symbolic, because I carried baby Harry when he delivered him to Dursley's at Privet Drive in the Philosopher's stone and he was also the one to first introduce Harry to the magical world.
"It was Hagrid who came and took him into the world and then Hagrid who would bring him back."
~J.K Rowling