First off, let me state that I am definitely NOT an expert in raising kids - are any of us? LOL But I did have a few thoughts as I read your questions. I used to be a junior high school teacher and this behavior is actually more common than you think. As frustrating as it is, you can't make someone else want for themselves what you want for them. She is going to have to find the desire within herself.
What I think you can help with the most, is being there for her. Thirteen is one of the hardest ages there is in growing up. Everything in their lives seems to be changing - a new school, new friends, new feelings, new bodies. My guess is that there is an underlying problem that is causing her to act out. Maybe she is struggling with self-esteem issues or depression. You might even check with a dr. about antidepressants or warning signs of severe depression to watch for. Perhaps she is having troubles with friends or boys. Also, it can't be easy changing where you live every week, right?
It seems like she is getting a LOT of attention from you right now because of her poor grades and tardies, etc. Have you tried just spending time with her doing fun things and creating moments where you can open up to each other and express your love for her? It's obvious that you love her very much. Maybe then she won't feel the need to act out because she's secure in your love and attention. Young teenagers need someone they trust to talk to more than anything else. Perhaps you could show up at school one day and "kidnap" her to the mall for lunch together and some shopping. Those kinds of fun activities give you opportunities to let her know that you believe in her and that you want her to have all of the greatest things in life.
My last suggestions is that you talk to her teachers. Maybe you have already done this - it sounds like you have, but have you talked to them about their grading? Personally, I find it frustrating that teachers give grades based on when the assignment is turned in rather than how well the assignment is completed. It doesn't seem like a fair measure of her subject comprehension. Of course, most teachers don't really know another way to get kids to turn in assignments on time, so maybe you can let them know that things are difficult right now and ask for them to be more lenient with deadlines or something. Believe it or not, most teachers are just dying to give kids good grades - they just need to know what's going on. They want your child to succeed almost as much as you do. :)
I hope something in here will help. Like I said, I'm not an expert and I don't really know enough about your specific situation to offer much, but I want you to know that you're not alone in this struggle. It's obvious that you want the best for your daughter and I applaud you for not giving up. I truly believe that LOVE is the key to everything in life so LOVE her with all your soul and LISTEN with all your heart. And don't forget to pray. ;) God bless and good luck!