As gently as I can say this: you've got to completely re-learn how to deadlift. Kettlebelephant has given you two great resources. The 5-Step system is a "no-fail" approach to a safe, anatomically correct, repeatable, efficient pull from the floor.
To clarify what is happening in your deadlift: you're setting up with the bar way out over your toes. With any appreciable weight on it, the bar needs to be over the balance point which is the middle of your foot. Not the middle of the part of your foot that you can see - the instep - the middle of the full length of your foot. It's going to put the bar about over the knot in your shoelaces. In your setup, with the bar far forward of this point, you've created a very long, very inefficient moment arm between the bar and your hip. I'm not one to assign causes for pain, so I'll just say that a longer moment arm against your hip requires much more strength to keep that segment - your back - straight. So, with the bar far ahead of where it needs to be, your shins are traveling a very long way to the bar, which causes your hips to be very low. Then you spend the actual pull trying to get the bar around your knees. If you straightened your knees to get them out of the way, your hips would rise, your torso would go more horizontal taking the bar off your shins and you'd be in a mess. So your body solves this problem by making you move the bar around your knees.
Set up as described in the video linked by KB Pachyderm above. Follow each setup step individually - don't try to combine them. It'll feel like you're crowding the bar. Ignore that. Great work, keep it up with increased safety going forward.