Messi, who started as a starter after being suspended by the club for lack of training last month, was booed by fans before and during the one-sided game.
Saint-Germain took their tally to 81 points, three games from the end, thanks to goals from Fabian Ruiz and Ashraf Hakimi, and a double from Kylian Mbappe, while Mohamed Youssef accidentally scored into his own net.
Coach Christophe Galtier’s side are six points ahead of second-placed Lens and 11 points over third-placed Olympique de Marseille, who host last-place club Angers on Sunday.
Ajaccio have 18 points from 23 games, 11 points ahead of 16th-placed Auxerre, and the bottom four teams, out of a total of 20 teams, are relegated to the second division.
Each team finished the game with ten players after Hakimi and Thomas Mangani were sent off late.
Read the Latest World News Today on The Eastern Herald.