The best way to go about this is to have a talk with your daughter, you have to do it in a way that doesn't drive her further into the arms of her bad boyfriend and out of your reach.
As much as you can, try to make the conversation about your daughter and not her boyfriend. Make it clear that you are talking from a place of love for her. Remind her of certain values she needs to uphold. Tell her how she should go about her relationship. You can also tell her how you handle relationships when you were her age.
Give her room to share her feelings and emotions to you, guide her appropriately and help her make right decisions.
If she hangs out with this boyfriend after this conversation, it is best you watch out for her, care and support her.