Dear Peter ugwu,
Welcome to the Wefugees Community and thank you for your question.
Similar questions were discussed on this platform before.Please see, for instance this thread and also the answer in this post for more information. The latter is stating: "The decision on your application is at the discretion of the immigration office.
The residence permit is usually granted only if the family unity between you, your child and his mother can only be conducted in Germany. It must be unreasonable for your child and his mother to follow you to your homeland."
Since there is apparently a reason for your family not being able to return to your country of origin and living in Germany is the only possibilty to keep the family united, I do not really understand why the immigration office is threatening to deport you. Maybe it could make sense to consult a lawyer or a counselling office in the first place, which offers free of charge and confidential services. Please let us know if you need support in finding a respective office in your region.
In any case, also don't hesitate to get back to us with any further questions.
All the best,