Self-assembly of peptides is closely related to many diseases, including Alzheimer's, Parkinson's, and prion diseases. Understanding the basic mechanism of this assembly is essential for designing ultimate cure and preventive measures. Template-assisted self-assembly (TASA) of peptides on inorganic substrates can provide fundamental understanding of substrate-dependent peptides assemble, including the role of hydrophobic interface on the peptide fibrillization. Here, we have studied the self-assembly process of a potential pentapeptide inhibitor on the surface of highly oriented pyrolytic graphite (HOPG) using real time atomic force microscopy (RT-AFM) as well as molecular dynamics (MD) simulation. Experimental and simulation results show nanofilament formation consisting of β-sheet structures and epitaxial growth on HOPG. Height analysis of the nanofilaments and MD simulation indicate that the peptides adopt a lying down configuration of double-layered antiparallel β-sheets for its epitaxial growth, and the number of nanofilament layers is concentration-dependent. These findings provide new perspective for the mechanism of peptide-based fibrillization in amyloid diseases as well as for designing well-ordered micrometrical and nanometrical structures.