The commercial rocket Falcon 9, owned by Elon Musk, lifted off from Kennedy Space Center in Florida, reports the CNN.
Seven minutes after liftoff, the first-stage rocket booster separated from the upper stage and fired its engines again.
An on-board computer then guided the rocket to a pinpoint landing on a 300-foot platform back at Kennedy Space Center.
The satellite was made for National Reconnaissance Office (NRO), a US government agency that develops and maintains spy satellites.
The NRO says the satellite aims to survey potential threats to the United States by tracking terrorists and monitoring the development of nuclear weapons in other countries.
It also has the capability to provide an early warning of a potential missile strike.