The Wikipedia article corresponding to "Outsourcing" in English is indeed called Subkontraktado, with the definition "signifas... transdonon, elorganizigon de laborfazoj al alia entrepreno, ofte en eksterlando".
So it sounds like technically it does cover the situation you described. I don't know if that matches the definition of "subcontracting" in English, but if not might be a false friends situation.
To me as a layperson, it seems reasonable to say that a company could "outsource" without the work originally done in house - if it expands to do new things or is brand new - so I'm not sure that "outsourcing" always implies what you described (I am definitely not an expert though).
In any case, there is not always a one-to-one correspondence between English and Esperanto words, and while English has two words for these similar ideas, it seems that Esperanto does not. If you want to be clear about having the connotation of one or the other, you should probably just spell it out explicitly.
La firmo subkontraktas laboron.
La firmo subkontraktas laboron kiu antaŭe estis farata de ĝiaj propraj laboristoj.