Judges were told that Nadine Koenig, 20, from German state of Bavaria, smothered her newborn son before killing him with a Stanley knife. She then went out to a disco, Daily Mail reported Monday.
According to prosecutor Ulrike Klein, the child was a responsibility that she could not handle.
"You couldn't bear the thought of your far-reaching sexual and social contacts being jeopardised by this baby," Klein added.
Koenig, who had concealed her pregnancy from her parents, had given birth at their home last February, the court in Regensburg city heard.