While there, it raised the Chinese flag, the country's space agency said.
When the probe left the Moon two days later, that marked the first time that China had achieved take-off from an extraterrestrial body, it said.
The module then went through the delicate operation of linking up in lunar orbit with the part of the spacecraft that brought the samples back to Earth.
Scientists hope the samples will help them learn about the Moon's origins, formation and volcanic activity on its surface.
The Chang'e-5 mission was to collect two kilograms (4.5 pounds) of material in an area known as Oceanus Procellarum—or "Ocean of Storms"—a vast, previously unexplored lava plain, according to the science journal Nature.
The capsule will be airlifted to Beijing for opening, and the Moon samples will be delivered to a research team for analysis and study, the space agency said.
Space dream
China will make some of the samples available to scientists in other countries, Pei Zhaoyu, deputy director of the Lunar Exploration and Space Program Center of CNSA, has said.
Xinhua described the mission as one of the most challenging and complicated in China's aerospace history. The probe comprised separate craft to get to the Moon, land on it and collect the samples, get back up and then return the rocks and soil to Earth, Xinhua said.
The return capsule entered the Earth's atmosphere at an altitude of about 120 kilometers (75 miles). When it was about 10 km above land, a parachute opened and it landed smoothly, after which a search team recovered it, the agency said.
This was the first such attempt to collect such samples since the Soviet Union's Luna 24 mission in 1976.
Under President Xi Jinping, plans for China's "space dream", as he calls it, have been put into overdrive.
China hopes to have a crewed space station by 2022 and eventually send humans to the Moon.
China launched its first satellite in 1970, while human spaceflight took decades longer—with Yang Liwei becoming the country's first "taikonaut" in 2003.
A Chinese lunar rover landed on the far side of the Moon in January 2019 in a global first that boosted Beijing's aspirations to become a space superpower.
The latest probe is among a slew of ambitious targets, which include creating a powerful rocket capable of delivering payloads heavier than those NASA and private rocket firm SpaceX can handle, a lunar base, a permanently crewed space station, and a Mars rover.
Explore further
© 2020 AFP