© Getty Images
The French international netted after only four minutes and added to his tally on the hour mark.
Ajaccio gave Marseille a brief scare when they pulled a goal back almost immediately, but Ayew restored his side's two-goal cushion to condemn the visitors to another defeat on their way to relegation.
Andre Pierre-Gignac twice squandered opportunities provided to him by Dimitri Payet as Marseille failed to make their first-half dominance pay with another goal before the break.
The striker sliced wide from close range, and then headed off target after a 30th-minute cross from Payet, who, along with Saber Khelifa, tested Ochoa in a one-sided opening 45 minutes.
Marseille got the second goal which their superiority warranted when Payet crossed for Ayew to head home on the hour mark, but Ajaccio replied only two minutes later through Junior Tallo.
However, Marseille did well to stall the momentum that the goal gave Ajaccio by keeping things quiet for 15 minutes, before putting the result beyond doubt courtesy of Ayew completing his treble.
From a 77th-minute set piece, Brice Dja Djedje crossed the second ball for Ayew to poke home from close range, to secure the hosts three points which see them move level with fifth-place Lyon.
Ajaccio remain rooted to the foot of the table, 15 points adrift of safety with only six games remaining.