Beethoven felt that she was not fit to raise Karl, so he entered into a vicious lawsuit over custody of the child. For the most part he was able to use his influence with the aristocracy to win the battle.
Beethoven's output was mostly null until 1818. At this point he was completely deaf and slightly mad. Also his brother died leaving Beethoven's only nephew, Karl, in the guardianship of his mother.
The late period saw the compositions of Beethoven's largest works: the Mass in D (Missa Solemnis), Op. 123 (1818-23), the 9th Symphony (Choral), Op. 125 (1818-23), the Hammerklavier Sonata, Op. 106 (1818), and the late string quartets.
Unfortunately Beethoven was not a fit father and his relationship with Karl was quite poor, driving him to an suicide attempt a few years later.
Beethoven loved Karl dearly, and the pain of his failed attempts to teach Karl music must have been devestating for Beethoven.
It's often spectulated that Karl was probably a strong contributor to Beethoven's late style.