This statement is false. There is a federal government program in which the US government reimburses states for the costs of incarcerating illegal immigrants. However, the program is not funded fully enough to actually pay for the entire cost of keeping these illegal immigrants in state prisons.
There is a program called the State Criminal Alien Assistance Program (SCAAP) in which the federal government will pay the states for the costs of imprisoning illegal immigrants. This program could potentially reimburse the states for all of their costs. However, in reality the Congress has not appropriated enough money to reimburse the states for all their costs. The link below estimates that the state of California lost about $900 million in costs for housing illegal immigrants in 2011. Thus, this statement is clearly false.