I assume you want to know how to describe a situation where you have done something wrong and you cannot keep it to yourself (keep it a secret, or keep quiet, or keep it quiet).
Based on your example, you should say:
She asked me not to tell you but I couldn't keep it from you.
It means someone asked you not to mention your "bad" deed to your partner (or friend or mother), but you really don't want to keep it a secret. You'd feel better to let it out to this person.
Hope my assumption of your question is correct :-)
Feel free to comment on it if this isn't related to what you wanted to ask.
Note:
- To do something bad = To do something that is not good
- To do something badly = To do something not so well
- To badly want to do something = To really want to do something
Also, please take a look at the Stack Exchange site for English Learners (http://ell.stackexchange.com/https://ell.stackexchange.com/), which is a really good resource for learning and improving your skills in English as a second language.