Call a local family law attorney. You could set up a temporary guardianship (or something similar to that). I do not practice law in MD, but I am sure there is something like this in your state. This will give guardianship to someone other than you (can place with a family member too).
You can basically turn yourself in to the local department of social service, which could then petition to have your son made a CINA (child in need of assistance). The problem with this is that you would have to then later convince a Judge that it is appropriate for the child to be returned to you, and that cannot be guaranteed once the court is involved.
it would be much better to have a friend or relative agree to obtain temporary custody of the child. Such an Order might be easier to reverse.
You are truly facing a difficult decision! You can try CASA (contact info below) for a referral to some useful resources in your area. I worked for this organization many years ago, and at that time, CASA helped families get necessary services so that children who were in voluntary foster could return to their parents. Although CASA is a national organization, their services may not be the same in every location, and they do many other things for children in the foster care system also; however, I think you may find they will be able to give you some direction. It may take a minute for them to understand you are looking to prevent foster care or to ensure that a voluntary placement is for as little time as possible. Good luck!
Court Appointed Special Advocates of Washington County
c/o Washington County Health Department
13114 Pennsylvania Avenue, Suite 210
Hagerstown, MD 21742
Phone: (240) 313-3383
Fax: (240) 313-3239
Program Director: David Bonebrake
IMPORTANT LEGAL NOTICE: Ms. Brownâ€™s response to the question above is not legal advice and it does not create an attorney-client relationship. All of Ms. Brownâ€™s responses to questions posted on AVVO are intended as general information based upon the facts stated in the question, and are provided for educational purposes of the public, not any specific individual. If you would like to obtain specific legal advice about this issue, please contact an attorney in your state. Ms. Brown is licensed to practice law in New York. If you would like to contact her directly for a legal consultation, you may do so by calling 718-878-6886 during regular business hours, or anytime by email at: email@example.com