The hosts wasted little time in taking the lead with Tony Andreu opening the scoring as early as the third minute thanks to a powerful close range header from Michael Devlin’s cross.
And 10 minutes later Mickael Antoine-Curier added a second with a superb volley from six yards thanks to Stephen Hendrie’s assist.
The hosts could have added further goals before the break with Scott Bain saving well from Andreu while Ali Crawford fired narrowly over.
The closest the Dark Blues came to finding the back of the net during the opening 45 minutes was via Jim McAllister who forced a decent save out of home keeper Michael McGovern.
Dundee performed better after the break although not before Antoine-Curier had flashed an effort inches wide of a post.
But the visitors were back in the game just after the hour mark with an excellent individual effort from Greg Stewart.
Hendrie went close again for Hamilton while Craig Wighton almost forced an equaliser seven minutes from time.
And almost five minutes into injury time Gary Harkins, who had already been substituted on 58, was shown a second yellow card following a fracas on the touchline as tension increased.
However, Hamilton saw the game out to collect their first victory over Dundee in six meetings and secure only a second win in eight from all competitions.