This is something that happens more often than you think and I have been guilty of doing this myself. The first thing that you have to remember is that you can do something about it, however you need to ensure that you follow the correct procedures to put the situation right.
The first step would be to try and intercept the offer letter before the intended recipient receives it, then in reality no offer has been made. If this is not possible you are still in a strong position to retract an offer of employment before the individual you have offered the job to accepts it.
Speed is of the essence; you would have to act quickly and confirm, in writing to the individual, that your circumstances had changed and that you were no longer in a position to offer the job to them. My advice would be to send the letter by special delivery, this way you can track receipt and guarantee delivery by a certain time.
If the individual has already accepted the job, then this is where things get complicated. You can still rectify the situation, but you will need to provide some compensation to the individual. This is because a contract of employment is formed at the time the individual accepts the offer as this carries with it an intention to be legally bound by the agreement. You ending this contract could potentially constitute a breach of contract, so you need to act carefully.
You need to be aware that the situation may be more difficult especially if the individual has already resigned from a previous job role. The least that you may need to consider offering the individual to head off a breach of contract claim is the notice pay that he would have received had he actually started work for you. In most cases this is only likely to be a week, but if it is a senior role then this may be as high as three or six months.
It is surprisingly true that people who have not yet actually starting working for you, and even job applicants, can take you to tribunal for discrimination so you should not withdraw an offer of employment on the basis that the individual possesses a protected characteristic, for example, because of age, race, disability etc.
Job offers can be made subject to certain conditions which, if not met, can lead to a withdrawal of the offer. This might be, for example, subject to satisfactory references, or criminal record checks, or evidence of eligibility to work in the UK. Although job offers can be made on condition of satisfactory health checks, it will not always be the case that you can simply rescind that offer once you become aware of a health condition which impedes someone’s ability to go a job where this is a disability.