The Pars dominated from the start and deservedly opened up a two-goal advantage before a strangely lethargic Accies came to life in the closing stages.
Dunfermline might have been ahead early on when Ryan Wallace saw his shot turned behind by Kevin Cuthbert. Andy Dowie then squandered a great chance when he sent a free header wide from Wallace’s corner.
However, the next ball into the home box brought a goal, Wallace’s whipped free-kick met by Andy Kirk’s firm header.
In the second half, Dunfermline had a scare when Paul Gallacher miscued a clearance straight to Ali Crawford but he shot wide of the empty goal from 35 yards. The Pars doubled their lead when Wallace’s corner was headed in at the near post by Chris Kane.
However, Accies responded immediately, Grant Gillespie drilling Louis Longridge’s cross firmly into the net, before Gillespie almost brought Hamilton level but for a superb reflex save from Gallacher.