The invention discloses a polypeptide with a function of inhibiting Aβ42 protein aggregation and use thereof, and a gene encoding the polypeptide. The polypeptide with the function of inhibiting Aβ42 protein aggregation is called PW-5, and has an amino acid sequence of Pro-Pro-Lys-Asn-Trp. The polypeptide with the function of inhibiting Aβ42 protein aggregation according to the present invention can effectively inhibit aggregation and deposition of Aβ42 protein, so as to effectively improve memory ability of a body; and can be applied to preparation of a drug or a food with inhibiting Aβ42 protein aggregation function or can be applied to preparation of a drug, a health product or a food for preventing or treating Alzheimer's disease, so that preventing and treating situations of the Alzheimer's disease can be effectively improve.