A federal appeals court Wednesday ruled a central feature of the Affordable Care Act was unconstitutional, but it ordered a Texas trial judge to reconsider a ruling that invalidated the entire 2010 health-care law.

The New Orleans-based Fifth U.S. Circuit Court of Appeals, in a 2-1 decision, struck down the ACA’s requirement that most people carry health insurance or pay a penalty.

The...