This is one of those tough things that many experience. If her choices are simply poor for her, try telling her that you care and worry about her. If her actions are illegal or reflect poorly on your morals and ethics, you need to walk away. There's no need to discuss why you've walked away because that will stir a huge pot between the two of you. You have your life to live and hopefully you have positive plans for that life; your can't allow others choices to alter those plans. I'm sorry, but you'll come out fine!
As a friend it your responsibility to guide your friend so talk to him or her. Tell your friend the decision they make are not okay with you and how you are going to lose your friendship if they continue to make the same decisions.