There are two ways to have legal custody of the child, either through a guardianship or through an adoption.
A guardianship is fairly easily accomplished. You could draft up the paperwork (it would certainly be easier through an attorney), have her sign off on it and then file it with the court. It could be accomplished as quickly as a week or two.
An adoption is more complex. The mother would need to have her parental rights terminated by the court system. This requires a petition for termination of parental rights and necessitates an attempt to locate the biological father or an affidavit that the father is unknown. Additionally, it requires a petition for adoption to be filed by you and your boyfriend. This would certainly be easier with an attorney.
The guardianship is quicker and cheaper while the adoption is permanent and more effective. Choose whichever method suits your needs.
I hope you found my answer helpful. If so, please click on the green ACCEPT for my answer. This is necessary for me to be paid for my work and so that I can get credit for assisting you. Even if you are a subscription member, you will need to click ACCEPT. Your question will not close, and you will still have the opportunity to follow-up if needed. Leaving a bonus and positive feedback is not required, but doing so is certainly appreciated! Thank you and good luck!
Also, several customers have asked how they may direct a question to me in particular. If you specifically want me to assist you in your legal matter, just put "FOR JOSEPH" in the subject line and I will gladly pick up the question as soon as I am on-line.