Alzheimer's disease is a devastating neurodegenerative disease triggered by the aggregation of amyloid-β peptide (Aβ) into amyloid fibrils. From the results of several studies it is believed that caffeine can prevent the development of Alzheimer's disease. However, the molecular mechanism of the therapeutic potential of caffeine is largely unknown. In our study, we have investigated the effect of caffeine on the aggregation of amyloid-β derived switch-peptide by varying the stoichiometric ratio of caffeine to peptide. Our molecular dynamics study of peptides in pure water show the formation of a β-sheet conformation, which is prevented to a large extent in the presence of a 10:1 or greater ratio of caffeine to peptide. The experimental results demonstrate that caffeine can inhibit the formation of β-sheets by interacting with the peptide aromatic moiety. A detailed molecular dynamics analysis of the inhibition of peptide aggregation by caffeine further revealed that caffeine molecules form hydrogen bonds with peptides thereby weakening the interstrand hydrogen bonds between the peptides. The self-aggregated caffeine clusters form a hydrophobic environment around the hydrophobic residues of the peptides, and physically block them from interacting with each other.