לֹא תַטֶּה מִשְׁפַּט גֵּר יָתוֹם וְלֹא תַחֲבֹל בֶּגֶד אַלְמָנָה.
You shall not subvert the rights of the stranger or the fatherless; you shall not take a widow’s garment in pawn.
And an article by OU which quotes Mishne Torah Deios 6:10:
Here’s how to treat orphans and widows: We must speak to them gently and treat them with honor. We may not cause them pain with work or hurt their feelings with sharp words. We must show more concern for their finances than for our own. Any person who angers them, hurts their feelings, oppresses them, or causes them a financial loss violates this prohibition. This is all the more so if one should happen to strike them or curse them.
If an employee was one these and they are under performing in their work and the employer has given him or her ample opportunity to improve or possibly there was a gross misconduct at work are the employees protected by the biblical verse? Or can the employer be able to let them go thinking that he has not transgressed the Torah.
This is purely halachic discussion not Halacha l’maseh.