The Dons stormed into a four-goal lead after half an hour thanks to goals from Tommie Hoban, Lewis Ferguson and a Ryan Edmundson double.
David Moyo quickly pulled one back for Accies and Ross Callachan further reduced the deficit with a penalty midway through the second half.