Nasa astronaut Kate Rubins carried out the test on the International Space Station (ISS) at the weekend.
She was using a compact DNA sequencing device called Minion, which was developed in the UK.
The device, which was sent up to the space station in July, could help astronauts diagnose illness in space and allow them to identify disease-causing microbes on the ISS.
DNA sequencing is the process used to determine the order of the four chemical building blocks that make up the genetic information from a given living organism.
While Dr Rubins carried out her work on the orbiting outpost, researchers were simultaneously sequencing identical test samples on the ground.
The experiment was set up to attempt to make spaceflight conditions, particularly microgravity, the only variables that could account for differences in the results.
Using the Minion in a weightless environment introduces several challenges including the formation of air bubbles in fluid used in the test.