NEW YORK—Disbarred attorney Steven Donziger was sentenced Friday to six months in prison for contempt of court after a federal judge concluded that he willfully violated orders stemming from a three-decade-long legal crusade against Chevron Corp. over pollution in the Ecuadorean rainforest.

Friday’s sentencing follows a July ruling by U.S. District Judge Loretta Preska in New York finding Mr. Donziger guilty of six counts of criminal contempt of court. She found that he disobeyed court orders as he sought to enforce a $9.5...

NEW YORK—Disbarred attorney Steven Donziger was sentenced Friday to six months in prison for contempt of court after a federal judge concluded that he willfully violated orders stemming from a three-decade-long legal crusade against Chevron Corp. over pollution in the Ecuadorean rainforest.

Friday’s sentencing follows a July ruling by U.S. District Judge Loretta Preska in New York finding Mr. Donziger guilty of six counts of criminal contempt of court. She found that he disobeyed court orders as he sought to enforce a $9.5 billion judgment that he won against the oil giant in Ecuador and that he was barred from profiting from.

Before handing down the sentence of six months and a $10 fee, Judge Preska said Mr. Donziger’s conduct had shown an astonishing disrespect for the law and the authority of federal courts.

“Mr. Donziger spent the last seven plus years thumbing his nose at the U.S. judicial system,” she said. “It’s now time to pay the piper.”

Mr. Donziger, who has already spent two years in home confinement, vowed to appeal. “I cannot today express remorse for actions I maintain are ethical and legal,” he told the judge.

He said the toll on his family and human-rights work had been punishment enough. Some of his supporters were at the courthouse Friday, many wearing face masks with the words “Free Donziger,” and dozens of his backers had written to Judge Preska asking that he be sentenced to time already served.

Before Friday’s hearing, the Harvard Law School grad had already been stripped of his ability to practice law and largely confined to his Manhattan apartment since August 2019, wearing an ankle bracelet.

In her July ruling, which came after a five-day trial, Judge Preska concluded that “at stake here is the fundamental principle that a party to a legal action must abide by court orders or risk criminal sanctions, no matter how fervently he believes in the righteousness of his cause or how much he detests his adversary.”

Mr. Donziger in 1993 first accused Texaco Inc. of polluting a swath of previously pristine rainforest, arguing in a New York lawsuit that the company’s drilling activities ruined the quality of life for local indigenous communities. Chevron later acquired Texaco and assumed its legal defense.

The company pushed back, successfully moving the dispute to Ecuador, where a protracted trial ended in a $9.5 billion judgment against Chevron in 2011. The win, however, was fleeting, with Chevron accusing Mr. Donziger and his allies of manipulating the proceeding even before the final judgment was entered.

That dispute brought the battle back to the U.S., where Chevron won a civil racketeering lawsuit codifying its theory that the Ecuadorean judgment was the product of ghostwriting and other inappropriate acts. That 2014 ruling by U.S. District Judge Lewis Kaplan essentially blocked Mr. Donziger from trying to enforce the Ecuadorean judgment or from ever profiting from the award.

Chevron has denied any culpability for lasting oil damage in the jungle, saying the company resolved the issue with Ecuador decades ago. It hasn’t paid any of the $9.5 billion award.

Chevron repeatedly flagged to Judge Kaplan when its lawyers believed Mr. Donziger was disobeying his 2014 ruling, including once when he hired a life coach in exchange for a sliver of his share in the Ecuadorean judgment.

In 2019 Judge Kaplan brought criminal contempt charges and referred the matter to Judge Preska for trial. In an unusual move, the case is being prosecuted by a private lawyer because the U.S. attorney’s office for the Southern District of New York declined to pursue it.

That private prosecutor, New York lawyer Rita Glavin, asked the judge in a court filing to consider that “Mr. Donziger’s disobedience was deliberate and repeated. He has expressed no remorse for his conduct. To this day, Mr. Donziger has not produced documents he was ordered to produce.”

Ms. Glavin also encouraged the court to “consider a sentence to deter those who would seek to undermine the rule of law in this way in the future.”

An attorney for Mr. Donziger, Ronald Kuby, saw it differently.

“Mr. Donziger has been punished enough,” he wrote in a presentencing memo.

Write to Sara Randazzo at sara.randazzo@wsj.com and Corinne Ramey at Corinne.Ramey@wsj.com