We report an optimization algorithm for studying bimetallic nanoclusters. The algorithm combines two state-of-the-art methods, the genetic algorithm and the basin hopping approach, widely employed in the literature for predicting structures of pure metallic and nonmetallic clusters. To critically test the present algorithm and its use in determining the lowest-energy structures of bimetallic nanoclusters, we apply it to study the bimetallic clusters Cun Au38-n (0≤n≤38). It is predicted that the Au atoms, being larger in size than the Cu atoms, prefer to occupy surface sites showing thus the segregating behavior. As the atom fraction of Cu increases, the bimetallic cluster Cun Au38-n, as a whole, first takes on an amorphous structure and is followed by dramatic changes in structure with the Cu atoms revealing hexagonal, then assuming pentagonal, and finally shifting to octahedral symmetry in the Cu-rich range.