Together with Didier Queloz in 1995, he discovered 51 Pegasi b, the first extrasolar planet orbiting a sun-like star, 51 Pegasi. For this achievement, they were awarded the 2019 Nobel Prize in Physics "for the discovery of an exoplanet orbiting a solar-type star". Related to the discovery, Mayor noted that humans will never migrate to such exoplanets since they are "much, much too far away ... [and would take] hundreds of millions of days using the means we have available today". However, due to discoveries by Mayor, searching for extraterrestrial communications from exoplanets may now be a more practical consideration than thought earlier.
From 1971–84, Mayor worked as a research associate at the Observatory of Geneva, which is home to the astronomy department of the University of Geneva. He became an associate professor at the university in 1984. In 1988, the university named him a full professor, a position he held until his retirement in 2007. Mayor was director of the Observatory of Geneva from 1998 to 2004. He is a professor emeritus at the University of Geneva.