The invention provides a method for preparing a peptide for improving brain function, comprising hydrolyzing milk casein with an enzymatic catalyst comprising a protease to produce a hydrolysate comprising: (i) a peptide consisting of the amino acid sequence shown in SEQ ID NO: 1 or a variant thereof (ii) a peptide consisting of the amino acid sequence shown in SEQ NO: 2 or a variant thereof or (iii) a mixture of the peptides of (i) and (ii), wherein the production yield of each of the peptides is 2% or more, or the total production yield of the mixture is 10% or more. The invention also provides a food or drink or a pharmaceutical composition containing the hydrolysate.