Trump's lawyers can appeal Judge Arthur Engoron's decision, a process that could take some time.
If the ruling holds up, though, Trump and two of his children, Donald Trump Jr. and Ivanka Trump, would have to meet with investigators from New York Attorney General Letitia James' office and answer (or refuse to answer) their questions.
Here's a look at what this is all about and why it is likely to be a headache for the Trumps, no matter what happens next:
WHAT IS THIS INVESTIGATION ABOUT?
James, a Democrat, is considering whether to sue Trump or his company, the Trump Organization, over the way they have valued his assets over the years. Essentially, her investigators contend Trump and his company had a “fraudulent or misleading” pattern of saying properties they own such as golf courses and skyscrapers were worth more when they wanted better deals on loans, and less when they wanted tax breaks.
Earlier this month, Trump's longtime accounting firm cut ties with him, saying that a decade's worth of financial statements they'd prepared for his company, using information Trump and his people provided, were no longer reliable.
Trump has bristled at allegations that he lied about his wealth. He and his lawyers have pointed out that asset valuations can be subjective. They've repeatedly ripped the investigation as purely political, and even sued James to try to stop her probe.
IS THERE A CRIMINAL PROBE, TOO?
Yes. The Manhattan district attorney is also investigating. A grand jury has been hearing testimony and reviewing documents covering much of the same subject material as James' civil probe.
WHAT IS A DEPOSITION?
A deposition is like an interview, usually held in a law office or conference room, except witnesses must swear an oath and could be subject to penalties if they commit perjury. They're typically recorded.
Depositions, frequently depicted in legal dramas as pitting one side against the other across a table, are most common in civil litigation and are often used to obtain information or get someone's answers on the record.
WILL TRUMP HAVE TO ANSWER THE QUESTIONS?
Since anything a person says in a civil deposition could also be used against them in a criminal investigation, witnesses are free to invoke their Fifth Amendment right to remain silent at any time.
So if he chooses, Trump could simply refuse to answer ...