In perfect conditions, the Italian BMW Motorrad Motorsport rider clocked a time of a minute 38.152, an improvement of six-tenths on his first session mark.
That sees him lead the way from Briton Tom Sykes's first qualifying-leading time of 1:38.200.
Championship leader Max Biaggi (Aprilia) is fifth in the list. Sykes can still win the championship at this weekend's finale should he win both races and hope Biaggi finishes outside the top six in both races.
Melandri is the other rider who could triumph, but after a poor run of form and with just a maximum 50 points available he stands 38.5 points behind his Italian compatriot.
Melandri is returning to action in France after sustaining back and rib injuries in an accident at Portimao and remains in some discomfort.
Carlos Checa, who had been second in the first session, improved his lap to stand third overall ahead of Briton Jonathan Rea, who was fastest in Friday morning practice.
The final qualifying session was interrupted by a red flag when Alex Lundh (Pedercini Kawasaki) fell.
Sylvain Guintoli jumped to sixth and is therefore the top local rider at Magny-Cours, with his French compatriots Loris Baz and Maxime Berger ninth and 16th respectively.
The other Britons Leon Haslam, Leon Camier and Chaz Davies were seventh, 13th and 14th respectively, while Ireland's Eugene Laverty was 10th.
John Hopkins has opted not to race any further on the final weekend of the season as he is finding the demanding circuit too uncomfortable.
Hopkins, who had part of a finger amputated prior to the season start, has also broken his hand and hurt his hip badly in 2012.
1 M. MELANDRI ITA BMW Motorrad Motorsport 1'38.742 1'38.152 1'38.152
2 T. SYKES GBR Kawasaki 1'38.200 1'38.628 1'38.200
3 C. CHECA ESP Althea Racing Ducati 1'38.648 1'38.565 1'38.565
4 J. REA GBR Honda 1'39.014 1'38.669 1'38.669
5 M. BIAGGI ITA Aprilia 1'39.144 1'38.669 1'38.669
6 S. GUINTOLI FRA PATA Racing Ducati 1'39.186 1'38.682 1'38.682
7 L. HASLAM GBR BMW Motorrad Motorsport 1'39.149 1'38.699 1'38.699
8 D. GIUGLIANO ITA Althea Racing Ducati 1'38.962 1'38.774 1'38.774
9 L. BAZ FRA Kawasaki 1'39.945 1'38.843 1'38.843
10 E. LAVERTY IRL Aprilia 1'39.382 1'38.978 1'38.978
11 M. FABRIZIO ITA BMW Motorrad Italia 1'39.139 1'38.990 1'38.990
12 C. CORTI ITA Pedercini Kawasaki 1'40.860 1'38.991 1'38.991
13 L. CAMIER GBR FIXI Crescent Suzuki S 1'39.285 1'39.005 1'39.005
14 C. DAVIES GBR ParkinGO MTC Racing Aprilia 1'40.084 1'39.053 1'39.053
15 L. ZANETTI ITA PATA Racing Ducati 1'39.709 1'39.176 1'39.176
16 M. BERGER FRA Red Devils Roma Ducati 1'39.842 1'39.303 1'39.303
17 A. BADOVINI ITA BMW Motorrad Italia 1'39.530 1'39.430 1'39.430
18 H. AOYAMA JPN Honda 1'40.631 1'39.750 1'39.750
19 J. HOPKINS USA FIXI Crescent Suzuki 1'40.538 1'44.960 1'40.538
20 A. LUNDH SWE Team Pedercini Kawasaki 1'41.535 1'40.882 1'40.882
21 N. BRIGNOLA ITA Grillini Progea BMW S1000 1'42.990 1'42.461 1'42.461