US space agency Nasa, which is aiming for a human mission to Mars in the 2030s, said it will provide technical support for SpaceX's first foray, known as Red Dragon.
SpaceX "could provide valuable entry, descent and landing data to Nasa for our journey to Mars, while providing support to American industry," Nasa said in a statement.
The announcement marks SpaceX's first target date for its unmanned mission to Mars.
The SpaceX program is intended to develop technologies needed for human transportation to Mars, a long-term aim for Musk's privately held company, which is formally known as Space Exploration Technologies.
The company said it will provide details of its Mars program at the International Astronautical Congress in September.
"Dragon 2 is designed to be able to land anywhere in the solar system," Musk posted on Twitter. "Red Dragon Mars mission is the first test flight."
He said that with an internal volume about the size of a sports utility vehicle, the Dragon spacecraft would be uncomfortable for people making the long journey to Mars.
SpaceX intends to debut its Mars rocket, a heavy-lift version of the Falcon 9 booster currently flying, later this year.
The company recently has made spaceflight history by returning Falcon 9 rockets to landing pads on land and sea - key to Musk's quest to develop a relatively cheap, reusable launch vehicle.
SpaceX now flies cargo versions of its Dragon capsule to and from the International Space Station under a $2 billion resupply services contract with Nasa.
SpaceX also is upgrading the capsules to carry astronauts, with test flights to the station scheduled for 2017, under a separate Nasa contract worth up to $2.6 billion.
Nasa does not plan to provide financial assistance to SpaceX's Mars mission. The agency is investing in its own heavy-lift rocket, capsule and launch pad modifications targeting Mars travel.
By the time Nasa expects to debut a test flight in lunar orbit with astronauts onboard in 2023, the agency will have spent about $24 billion on the program, an April 2016 Government Accountability Office report shows.
© Thomson Reuters 2016