In the aftermath of the Civil War, state judges lost their long-held right to inquire into the legality of federal detentions, and habeas corpus—once almost solely the business of state courts—was largely transformed into a federal remedy. We argue that the wartime furor surrounding underage enlistees was a key factor in driving this legal change. Scholarship on the use of habeas corpus during the war generally concentrates on cases involving freedom of speech or political association, but thousands of parents and guardians also petitioned Union authorities and state courts to retrieve minor children who had enlisted without their consent. Angrily demanding that the military discharge such youths, they portrayed control over the personhood and labor of minor children as fundamental to American liberty. At the same time, state court judges fought to retrain jurisdiction over such cases as a critical check on federal and military power. We illuminate these conflicts by drawing on a rich array of sources that capture the competing perspectives of federal and state court judges, Lincoln Administration officials, elected representatives, military officers, parents and guardians, and minors themselves. In the process, we show the halting and contested transformation of habeas corpus, the outcome of which ultimately redefined the relationship between American citizens and their government, preventing aggrieved parents from using state courts to safeguard their rights against federal and military authorities, and blocking state courts from querying the legality of federal detentions of any kind.