I think that having a boyfriend at that age is completely normal. I do remember having and being totally inlove at that age and now that I am so much older I remember that time with a lot of happiness and longing for the buterflies in the stomach and sillyness when I was going to see my boyfriend.... I have to make a remark here and it is that sex was never ever in my head and I would have not done anything at that age... but times and persons are different, if that is what scares you I understand.
You do not mention that the boyfriend is a bad influence or has bad attittude or anything like that. If he is a good boy, you can team up with him in order to get your girl to care for her appearance and even play it with her...... "you don't think that with this dress you would look prettier for .....boyfriend....".... oh, you don't think that doing this will be nice for him?.... wouldn't it be nice that we bake together cookies for ...boy...".
It seem to me that this girl has suffered a lot, not having her parents and staying in a house without structure at a very important time of her time must have given her a feeling of loneliness and not worth it.... of abandonement.... spending time, positive time with her, giving her lost of hugs and kisses whenever and for no reason... compliments.... should help a lot.
Structure, dicipline is important, which you seem to have already done, now try to get closer and be as much as a friend as posible, make her boyfriend thing or whatever for this matter part of or an excuse to share, participate and do things together.
Invite the boyfriend over to the house, to visit her at your house, to have a lemonade to spend some time somewhere you can see how they behave with each other, get to know him..... even if his looks may not be what you would like... he may be a very good boy just with bad taste..... or maybe he is not such a nice boy but if you do not have a chance to observe it you'll never know.
No matter what, do not try to convince your girl to leave him, that will never work..for some reason if the parents say they do not like someone kids will like them even more.... make clear to her that you will be and are there for her when she needs you or wants to talk or share things.
She has already suffered too much, she needs tons of love, firm and tough love some times but tons and tons of love... she needs reassurance that she will not be abandoned yet another time.... she could use lots of "good job" or "oh, that looks so good on you!",..." I would really like for you to come with me to the store I can really use your opinion or input"....
Try the sweet and encouraging approach, you may be surprised for the outcome.
She may not know it, but she is already very lucky since she has YOU in her life, you obviously care and love this little girl and you will find in you everything you need to make a beaufitul relationship and family with your girl.
I really wish you all the luck and I think that you are an incredible person just for taking her in and be really trying your best to raise your grandaughter.