US District Judge Denise Cote denied Apple's request to delay enforcement of the order that stems from a ruling in July that Apple illegally colluded with book publishers to fix prices.
She gave Apple only until Monday to accept compliance, but said it could get an extension from an appellate court if it files a request by Saturday.
An Apple attorney, Theodore Boutrous, said an appeal would be filed.
The judge's 64-page order harshly criticized Apple for failing to work with the court-appointed monitor, former prosecutor Michael Bromwich, and said she appointed him only after Apple made it clear it would not reform its practices on its own.
"That said, the monitor has important work to do, and where that work properly includes interviews of board members or executives, then the monitor must be permitted to conduct those interviews."
The judge said Apple failed to show it would be "irreparably harmed" by complying with the court order or with the monitor.
