The 21-year-old was named club captain 48 hours after securing a permanent move to Tynecastle after accepting reduced terms to the three-year contract he had agreed before the club went into administration.
With Hearts short of cash and under a transfer embargo, Wilson's move to Tynecastle appeared scuppered, but John Sutton's departure for Motherwell and a Scottish Professional Football League ruling that Wilson could extend his registration following his loan move from Liverpool meant the switch could go ahead.
Now he has been handed the armband ahead of more experienced players. Wilson told the club's official website: "It is obviously a real honour to captain a club of this stature and I was delighted to accept the offer. Heart of Midlothian Football Club is a footballing institution and it is a real privilege to be given this responsibility."
Hearts begin the SPFL top-flight season 15 points behind all of their rivals but Wilson is determined to battle for the club and Locke, who took charge in March.
"The gaffer has shown a lot of faith in giving me the armband and I'll do everything I can to repay him," the former Rangers centre-back said. "The whole squad is desperate to do well for the manager. This has been a really tough time for him but we are all right behind him.
"There is no doubt the season coming up is going to be a difficult one but we are ready for the challenge. The situation we are in has brought the squad even closer together and we can't wait to get started."
Locke revealed he had thought long and hard about his decision. "It was a tough decision as the more experienced players have all made huge sacrifices over the summer and showed me the type of commitment I want here," he said.
"I feel Danny is the right man for the job. He has a lot of experience for someone so young, is a good talker and is a quiet lad off the pitch as well which is something you're looking for in your captain. It is a big responsibility for him but he has all the right credentials as far as I am concerned.
"He is a winner, commands respect in the dressing room, which is a big plus, and knows what the club is all about. He has made the same sacrifices as Jamie Hamill, Ryan Stevenson and Jamie Macdonald and, as I said, I do feel he is the right man for the job. Hopefully he can be the leader of a successful team this season."