WASHINGTON—The Justice Department ended its efforts to sink AT&T Inc.’s 2018 acquisition of entertainment company Time Warner, after a federal appeals court on Tuesday rejected the government’s bid to roll back the $80 billion-plus deal.

The U.S. Court of Appeals for the District of Columbia Circuit ruled unanimously that the Justice Department was “unpersuasive” in seeking to overturn a decision by U.S. District Judge Richard Leon last June that allowed the deal.

Judge...