The former Hornets defender had been the firm favourite to replace Brendan Rodgers in the Vicarage Road hot-seat after spending the last two-and-a-half years as first-team coach at the Championship club.
Watford were forced to begin their search for a second new manager inside the last eight months after Rodgers quit to take over at Reading two weeks ago.
"Malky has all the attributes to be a good manager. He has great leadership skills and crucially gives us continuity at the club," chairman Jimmy Russo told the club's official website.
"He inherits a good set-up and I'm sure he can build on that.
"Malky is his own man and proved himself in the interview. Overall I'm delighted with the appointment."
Mackay, who was part of the Watford squad which won promotion to the Premier League during the 2005-06 campaign, added: "I'm absolutely delighted to get the job.
"I've been planning for a few years with the aim of eventually becoming a first-team manager.
"I couldn't have had any better grounding than what I've had at Watford over the last four years or so in the various roles I've undertaken.
"Now I'm just looking to the future and I can't wait for pre-season to begin so we can get to work on the training pitch."