Is graphite a better lubricant on the Moon than on the Earth?
Graphite, like most solid lubricants, has a layered structure which makes it a good lubricant. 
The atoms of a layer are strongly bonded to each other, while the interlayer (van der Waals) forces are much weaker. 
The layers align themselves between the sliding surfaces and the layers slide one over the other providing lubrication. 

Since it are the shear forces that come into play, gravity has no influence on the system. 
From that point of view, there is no difference between its use here or on the Moon. 
But, there are also extrinsic factors which influence its performance. 

Graphite works best in a humid environment. 
This is probably due to the weakening effect of the water molecules on the interlayer forces. 
So, graphite should not work well in vacuum. 

Another solid lubricant, $\ce{MoS2}$, which has also a layered structure like graphite, works much better in vacuum and should be the lubricant of choice on the Moon.