France midfielder Matuidi struck three minutes into stoppage time to seal the victory that puts PSG, who have played 33 games, behind Monaco, who have a game in hand, only on goal difference, with 77 points each.
Metz, who are 15th on 36 points, were quickly overwhelmed by a confident PSG side.
In the 33rd minute, Ligue 1 top scorer Cavani opened the scoring by heading in Maxwell's cross.
Three minutes later, Maxwell was at it again, finding Matuidi with a nice through ball for the midfielder to score from just inside the box.
Jouffre gave Metz some hope in the 78th minute with a perfectly-executed free kick from 25 metres and 10 minutes later, Diabate volleyed home to equalise.
Jouffre came close to giving the hosts all three points in injury time when his free kick struck the crossbar, but it was PSG who won it when Matuidi headed home from Pastore's cross in the third minute of added-on time. (Reporting by Julien Pretot; Editing by Neville Dalton)