The 40-year-old begins his second spell as Tynecastle boss after leading Dundee United to the Championship title. He won that division with Hearts in 2014/15 and guided them to third place in the top flight the following season.
Neilson, who has also managed MK Dons, told the Hearts website: "You don’t turn down the chance to come to a club like Hearts and I’m absolutely delighted to be coming back.
“I had some great experiences here, both as a player and manager, and I’m keen to pick up where I left off. Everyone knows there is a really good squad at Hearts and I’m excited to begin working with the players and staff.
“I’d like to say thank you to Dundee United for the opportunity they gave me two years ago. I hope the United fans feel that together we managed to restore the club back to where it belongs.”