Wilson becomes manager Gary Locke's first signing of the summer as he looks to rebuild his squad for next season.
The 21-year-old spent the latter of half of last season on loan at Tynecastle and says that he is thrilled to be making the move permanent.
|2/1||Liverpool are 2/1 with BetVictor to sign Thomas Ince from Blackpool by September 1
"I really enjoyed my time on loan here and am very pleased the move has been made permanent. This is a great club with great supporters and I'm looking forward to helping bring more success to Hearts.
"I believe the club has a bright future with a lot of good young players and being part of that excites me."
The centre-back made 15 appearances for Hearts last season and manager Locke declared his happiness to have captured the former Liverpool man.
"I'm delighted that Danny has decided to sign for the club permanently," he enthused. "He has a wealth of experience despite only being 21 years old and has already shown how talented he is in his loan spell here.
"I'd like to thank Liverpool for allowing him to come here in the first instance and Danny himself for showing faith in this club and choosing us when there was interest elsewhere.
"This is the type of player I'm wanting to attract to the club and I firmly believe that if he continues to play the way that he can then he'll be called back up to the Scotland squad in no time at all."