Your question is not clear enough for me to hazard an answer, but there is hope here. If he is now in custody curtesy of federal charges he will get a good attorney even if he can't afford to hire his own. Unlike their state counterparts the Federal Defenders are highly skilled and adequately paid and resourced to provide outstanding representation to indigent federal defendants.
Usually the warrant will remain outstanding and act as a detainer until the federal case is resolve. If the federal charges send him to prison, then the state might drop the warrant, although it doesn't have to. If the federal charges were dismissed, done the warrant acts as a detainer, so that the state might prosecute him. Both the state and federal governments have the right to separately and consecutively prosecute him. He could receive consecutive sentences from each government for having committed the same crime. That is rare, because it uses a lot of resources.
Information in the reply is provided as a public service. It is neither a comprehensive statement of the law nor legal advice, and no one should rely on it as such. If you have a legal problem or question, you should consult with an attorney, who can investigate the particular circumstances of your situation. Responding to a post does not constitute legal representation. I am not your lawyer, until we make an agreement and I receive my fee. Beware that posts and replies are not confidential. Anyone can read them.