sddsddean's got it in a nutshell, I reckon.
'i.e.' refers to something specific - "the victim, i.e. the bloke who was thumped, was the one who reported the incident."
'e.g.' refers to more general examples - "many dog breeds, e.g. rottweilers and alsatians, are thought to be vicious.
I find it helps to think of 'i.e.' as 'that is' and 'e.g.' as 'example given'.
It's come up at work recently. We're undergoing job evaluation and the person who's typed up the job reports has labelled the examples of our tasks as 'i.e.', making it look as though that's the only task we do for certain aspects of the job, whereas what we've given are just typical examples from a range of tasks.