A test version of a cargo return capsule also successfully separated from the rocket, Xinhua added. The spaceship will one day transport astronauts to a space station that China plans to complete by 2022 - and eventually to the Moon.
It will have capacity for a crew of six. The spaceship and capsule are slated to return to a landing site by Friday after completing their test flights, Ji Qiming of the China Manned Space Agency told a press conference.
Leader of the command headquarters for the flight mission Zhang Xueyu said the launch had "strengthened confidence and determination" for the next stages of China's space programme.
The United States is so far the only country to have successfully sent humans to the Moon.
But Beijing has made huge strides in its effort to catch up, sending astronauts into space, satellites into orbit and a rover to the far side of the Moon.
The successful maiden flight of the 54-metre Long March 5B - which has a takeoff mass of about 849 tonnes - should reassure China, following failures of the 7A model in March and 3B model in April.