How to parse: Post-order/ detention / petition
Detention: holding an illegal immigrant in custody
Post-order: in this context, this almost certainly refers to a deportation order (illegal immigrants are sometimes held in detention after an immigration judge has ordered them deported, until such time as they can actually be deported).
(Habeas) petition: a petition for a writ of habeas corpus
https://www.law.cornell.edu/wex/habeas_corpus Here's an overview of what this all is and how it works:
https://www.unhcr.org/en-us/5cfa9a964.pdf So basically this sounds like an immigrant was ordered deported, and is now being held in detention (similar to a jail), and the immigrant's lawyer is filing a petition for a writ of habeas corpus, in an effort to have the illegal immigrant released.
Hope that helps you figure out an appropriate translation.