From looking at dictionary definitions and example sentences from dictionaries and concordancers (and this website), I am coming to the conclusion that ‘thereby’ introduces the practical result of an action and ‘therefore’ introduces the logical result of an action or situation.
Having said that, it seems to me that the words are often interchangeable. Look at the following example sentences taken from dictionaries and online concordancers. I think both words could be used in these:
1. The aim of the military action was to open the roads to Sarajevo and thereby end the capital’s 40-month seige.
2. In the circumstances the defendants had done that which was reasonably practicable and had thereby satisfied the duty of care imposed upon them.
3. He was injured and therefore unable to play.
4. Dutch euthanasia practice is legalised and therefore becomes a collective responsibility.
Note: I think you could easily substitute ‘thus’ for both ‘therefore’ and thereby’ in these sentences, so I have to disagree with gailcalled’s point.
However, I have noticed that ‘thereby’ is frequently used the -ing form of the verb and ‘therefore’ is not. e.g.:
Our bodies can sweat, thereby losing heat by evaporation.
Jon paid the registration, thereby automatically renewing his membership.
Actually, I think Mritty’s response probably sums up the difference in meaning best: how vs why.