The 39-year-old replaces Stuart Houston at Tannadice after the Arabs agreed a deal with his former club Partick Thistle.
McNamara and Falkirk boss Steven Pressley had been the leading candidates in the past few days and the Jags boss edged in front.
He takes over on the eve of United’s biggest match of their season so far, as they host Rangers in the fifth round of the Scottish Cup on Saturday, and inherits what should be a relatively fresh squad after last night’s fixture at Motherwell was rained off.
Cup opponents Rangers were dealt a blow today.
It was announced that defender Darren Cole will be out for the season after having ankle surgery.
Gers chief Ally McCoist said: “So that’s the season over for Darren but hopefully he has set his sights on being back strong in the summer with a view to next season.”
In better news for the Light Blues McCoist also revealed that Chris Hegarty should be fit for Saturday after shaking off a thigh knock, while winger Barrie McKay penned a new five-year deal today.