The US space agency said it would study the feasibility of awarding Musk's company a contract to boost the Hubble Space Telescope to a higher altitude.
The observatory has been operating since 1990 and is in a slow decay state.
Hubble has no on-board power to counter the drag in this region of space, and its altitude has previously been restored.
A new effort would be involving a Dragon capsule.
NASA's chief scientist Thomas Zurbuchen said that the agency had agreed to the study at no cost to itself.
There are no definite plans to conduct or fund such a mission at the moment.
Unlike the Space Shuttles, the Dragon spacecraft does not have a robotic arm and needs modifications for such a mission.
The idea was proposed in partnership with the Polaris Program, a private human spaceflight venture led by a payments billionaire.
"This would fit within the parameters we established for the Polaris program, and it would definitely be a goal for a future Polaris mission," he said.
Zurbuchen was asked if there was a perception that the mission was contrived in order to give wealthy people tasks to do in space.
Earendel, the farthest individual star ever seen, was detected by Hubble this year, making it one of the most valuable instruments in science.
The Hubble Space Telescope has a 50 percent chance of being de-orbited in 2037.
Agence France- Presse.