The homochirality of amino acids in living organisms is one of the great mysteries in the phenomena of life. To understand the chiral recognition of amino acids, we have used scanning tunnelling microscopy to investigate the self-assembly of molecules of the amino acid tryptophan (Trp) on Au(111). Earlier experiments showed only homochiral configurations in the self-assembly of amino acids, despite using a mixture of the two opposite enantiomers. In our study, we demonstrate that heterochiral configurations can be favored energetically when l- and d-Trp molecules are mixed to form self-assembly on the Au surface. Using density functional theory calculations, we show that the indole side chain strongly interacts with the Au surface, which reduces the system effectively to two-dimension, with chiral recognition disabled. Our study provides important insight into the recognition of the chirality of amino acid molecules in life.