The 50-year-old accused, identified as Knut S., is one of eight people charged with belonging to an online paedophile ring. He confessed to sexually abusing the boy, now aged nine, during his trial in the southwestern city of Freiburg earlier this month.
He also admitted to filming the abuse and said the boy's mother and her partner witnessed some of the acts.
The Bundeswehr soldier was found guilty of rape, producing child pornography and forced prostitution.
The Freiburg court had already handed a 10-year sentence to a 41-year-old man in the same case last month, described by local police as one of the worst cases of child sex abuse they have ever investigated.
Both men were also ordered to pay the victim 12,500 euros ($14,700) each in compensation.
Prosecutors allege that the boy's mother and her partner prostituted him to men over the internet over a two-year period, as well as abusing the boy themselves. Their trial is set to begin next month.
The case came to light following an anonymous tip last September, with the eight suspects arrested soon after.
The boy is in state care.