The defender spent the last four months on loan at Tynecastle from Anfield and will sign a permanent deal when his Liverpool contract expires.
The 21-year-old, who left Rangers for Liverpool in a £2million move in 2010, told Hearts News: "It didn't take me long to decide about committing myself to Hearts once the club made it known they were keen to keep me."
He added: "I just want to play football and I firmly believe that staying at Tynecastle will benefit my career.
"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."
Wilson is Gary Locke's first signing as manager and he comes in with fellow centre-back Marius Zaliukas set to depart.
Locke said: "I'm delighted that Danny has decided to sign for the club permanently. 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."
- Sports & Recreation