Named Starship, the human landing system (HLS) designed by SpaceX will carry crew, supplies and equipment between a craft in lunar orbit and the moon's surface during the planned 2024 mission.
The astronauts will be launched into orbit in NASA's Space Launch System rocket onboard the Orion spacecraft. Two crew members will then transfer to SpaceX's Starship, which will transport them down to the moon.
Above: NASA has chosen SpaceX for the Artemis mission. Top image: the spacecraft will land humans on the moon
"With this award, NASA and our partners will complete the first crewed demonstration mission to the surface of the Moon in the 21st century as the agency takes a step forward for women's equality and long-term deep space exploration," NASA's associate administrator for human explorations and operations mission directorate Kathy Lueders said.
"This critical step puts humanity on a path to sustainable lunar exploration and keeps our eyes on missions farther into the solar system, including Mars."
Artemis to land first woman and first person of colour on the moon
SpaceX's Starship uses Raptor engines and draws on the flight heritage of the company's previous Falcon and Dragon spacecrafts.
The company has conducted six suborbital flight tests of the Starship, which has a spacious cabin and two airlocks to be used for moonwalks by the astronauts.
At least one of those astronauts will be a woman, who will make history by becoming the first woman to land on the lunar surface. The Artemis program also aims for another historical first by landing the first person of colour on the moon.
SpaceX has built 10 Starship prototypes since January 2020, but a number have exploded during tests.
"For the next phase, going forward, we have to make sure that the testing occurs because we're not going to launch humans until we have a successful test," Lisa Watson-Morgan, program manager for HLS at NASA's Marshall Space Flight Center, said during the announcement.
Mission planned as first moon landing since 1972
SpaceX was competing against Amazon founder Jeff Bezos's Blue Origin and Alabama-based Dynetics to win the contract.
The total award value of the contract for the Starship is $2.89 billion, and its architecture is meant to evolve to a fully reusable launch and landing system designed for travel to the moon as well as Mars and other destinations.
The Artemis project, which will mark the first time humankind has landed on the moon since 1972, is being undertaken as preparation for a future mission to Mars.
Last year NASA announced that it is working with architecture studio BIG to design 3D-printed buildings for the moon, and debuted SpaceX spacesuits featuring its 1970s "worm" logo.