Eyewitnesses called police early on Tuesday evening after spotting the man placing the body part outside the main entrance to Bonn district court.
German police said a body they believe to belong to the severed head was found a few hundred metres away near the Rhine River.
The suspect, a 38-year-old man from Bonn, was arrested after being found near the court building.
Police said the detained man is known to officers, particularly for narcotics crime.
The victim has not yet been identified but is thought to be a 44-year-old man, according to German newspaper General Anzeiger.
Investigators said initial inquiries suggest both the suspect and victim were homeless.
No weapon has yet been found.
Police said no suspicious activity was reported in the area, and they are seeking witnesses.
“The background to the crime is still unclear,” General Anzeiger quoted police spokesman Robert Scholten as saying.
“We only have two locations so far. The route taken by the suspect is also not known. At the moment we can only describe the scene.”
Images taken at the scene on Bonn’s Bertha-von-Suttner-Platz showed police vans blocking the road while a blanket concealed the head from view.
Bonn Police said in a statement: “At around 5.35pm, witnesses informed the police control centre that a human head was lying in front of the Bonn courthouse on Wilhelmstrasse.
“After the first arriving police forces confirmed this initial report, a suspect was identified and arrested in the immediate vicinity.
“A little later, further investigations led to the discovery of a corpse in the area of the old customs.
“The suspect is a 38-year-old man who is known to the police in particular for narcotics crime. The victim has not yet been identified.
“Both the suspect and the victim can be assigned to the homeless scene according to the first investigations. A possible instrument of the crime has not yet been found.”