The Tangerines got off to a flying start through Johnny Russell’s second-minute opener before John McGlynn’s visitors had Ryan Stevenson sent off for a foul on Gary Mackay-Steven midway through the first half.
Willo Flood made it 2-0 for McNamara’s side on 62 minutes only for Michael Ngoo to pull one back for the Jambos in the 76th.
Despite their best efforts to force a late equaliser it was the revitalised hosts who ran out winners, with substitute Michael Gardyne sealing matters in the final minute.
United did not have long to wait on their return SPL action before breaking the deadlock against a stunned Hearts side, with John Rankin’s cross being met by Russell, who took the ball off the toe of team-mate Stuart Armstrong before swivelling and finishing with his right foot low into Jamie MacDonald’s right-hand corner from eight yards.
Hearts suffered a blow in the 19th minute when skipper Marius Zaliukas was forced to go off injured after clashing with Russell and then appearing to land awkwardly on his ankle.
A minute later, though, they brought out a fine save from United keeper Radoslaw Cierzniak in their first real attack of the game. Defender Danny Wilson fed fellow on-loan Liverpool player Ngoo, who wasted no time in firing in a 22-yard shot which Cierzniak did well to fist to safety.
But on 25 minutes Stevenson was sent off for a challenge on Mackay-Steven. The Hearts midfielder appeared to go in on high on the United winger and referee Willie Collum showed no hesitation in producing a straight red card despite Heart’s bitter protests.
The second half was a flat affair until the 56th minute, when visiting keeper MacDonald dived smartly to deny Daly a goal.
But in the 62nd minute the hosts extended their lead to 2-0. A slick one-two involving Russell and Flood saw former Celtic midfielder Flood steady himself before slotting a perfect left-foot finish past the helpless MacDonald.
A few minutes later, Hearts came close at the other end when Gavin Gunning’s mistake allowed Ngoo to gain possession and his raking 20-yard drive came crashing back off Cierzniak’s bar.
In the 76th minute, Hearts gave themselves some hope when United failed to clear Fraser Mullen’s corner and Ngoo pounce to drive a shot home from 12 yards.
But any hopes they had of a comeback ended in the 89th minute when Rankin released Daly, who cut the ball back for substitute Gardyne to finish from point-blank range.