1. Take care of yourself. This includes getting the sleep that you need consistently, eating right, exercising regularly, avoiding those stresses that you can avoid, and making good use of down time to relax. I think people often mistake the lethargy that comes with poor nutrition or lack of sleep for a lack of motivation.
2. Learn how you learn. If you want to develop good study habits you have to figure out what works best for you and this could involved some experimentation. Assess critically what has worked for you in the past and try to predict what kind of changes you will need as the coursework becomes more challenging. It's a lot easier to maintain your motivation if you feel like you're being effective with your study habits.
3. Identify and limit your vices. You probably already know what these things in your life are. You also very likely have an idea of where that threshold is between necessary down time and procrastination. It takes a lot of willpower to avoid these and willpower is not an unlimited resource. Figure out way to make these activities a little harder to do in your daily routine.
4. Make the time to follow your personal interests. It's extremely easy to get caught up in the trap of working from assignment to assignment and studying only the material that's covered in your courses. While the majority of this should be intrinsically interesting to you, I've always felt that it's important to read up on the stuff that may not be covered in your classes, but that you really want to know about. Often classes will "touch on" something or even skip topics altogether that you may have an interest in. You are most motivated when you're trying to figure out a problem that you've set for yourself... or at least I am.
5. Spend time with like-minded, positive people who have similar goals. Avoid spending time with people who have negative attitudes or who are negative influences. You tend to pick up habits from the people you hang around.