Molecular dynamics simulations based on a coarse-grained, bead-spring model are adopted to investigate the stability of both nonfunctional and functional perfluoropolyether (PFPE) on solid substrates. For nonfunctional PFPE, the surface morphology changes little with time. The film is stable. For functional PFPE, part of lubricant molecules show local dewetting which causes the increase of surface roughness with time. The film is unstable. Besides, the changes in surface morphology with different endbeads are compared, which indicate that the endbead-endbead interaction is the principal reason for the film instability and the endbead-substrate interaction has little effect on the film stability.