All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
The loan which you inquired about in the question is a loan which involves Ribaa (interest and usury) and it is forbidden due to the existence of the condition of Ribaa in it. The debtor conditioned a benefit in return for lending that loan; the condition is that the employee should continue working for him for a specified period of time. It is known that any loan that yields a benefit is forbidden. Ibn Dhuwayyaan from the Hanbali School of jurisprudence, said: "Any loan that yields a benefit is forbidden, such as the debtor giving his house for the creditor to live in, or lends it for him, or does a work for him and the like (in return for lending him)." Putting the condition which you mentioned in the question makes things worse because entering a contract which contains a forbidden condition is not permissible in principle, as by doing so, one is pleased and confirms falsehood, even if the person who enters such a contract knows that he can avoid the Ribaa.
For more benefit, please refer to Fatwa 90131.
Allaah Knows best.