Jan Hecker's exact cause and time of death remain unclear.
"It is with deep sadness and dismay that we learned of the sudden death of the German ambassador to China," Germany's Federal Foreign Office said on its website when confirming the death.
The 54-year-old, a foreign policy adviser to Angela Merkel, the German chancellor, presented his credentials at China's foreign ministry on 24 August, Beijing said.
An embassy spokesperson declined further comment.
Chinese foreign ministry spokesperson Wang Wenbin offered condolences when asked about Mr Hecker's death during a regular media briefing.
"We are shocked to learn about the sudden death of Ambassador Hecker, who had been working actively to promote China-Germany relations since assuming his post," he said.
China would provide assistance to Hecker's family and the embassy, he added.
Mr Hecker had appeared "happy and all right" when he hosted an event about German artist Joseph Beuys at his Beijing home last Friday, a guest at the event said.
The deceased's family remains in Beijing.
He is survived by his wife, who also works in the embassy, and their three children.
Before entering politics, Mr Hecker worked as a federal judge.