A new algorithm is developed, based on the friends-of-friends (FOF) algorithm, to identify galaxy groups in a galaxy catalog in which the redshift errors have large dispersions (e. g., a photometric redshift galaxy catalog in which a portion of the galaxies also have much more precise spectroscopic redshifts). The DEEP2 mock catalogs, with our additional simulated photometric redshift errors, are used to test the performance of our algorithm. The association of the reconstructed galaxy groups with the dark halos in the mock catalogs gives an idea about the completeness and purity of the derived group catalog. Our results show that in a 0: 6 <= z <= 1: 6 galaxy catalog with an R-band limiting magnitude of 24.1 and an average 1 sigma photometric redshift error of similar to 0.03, the overall purity of our new algorithm for richness 4-7 (line-of-sight velocity dispersion similar to 300 km s(-1)) groups is higher than 70% (i.e., 70% of the groups reconstructed by our algorithm are related to real galaxy groups). The performance of the new algorithm is compared with the performance of the FOF algorithm, and it is suggested that this new algorithm is better than FOF for a database, given the same redshift uncertainties.