The ruling represents a victory for Microsoft in its drawn-out legal battle with Sun over the Java software.
The unanimous decision Thursday by the three-judge panel of the 4th U.S. Circuit Court of Appeals vacated a December ruling by a federal judge in Baltimore.
The court upheld another preliminary injunction barring Microsoft from distributing its own version of the Java software on Windows.
Java software is used to create interactive programs on Web sites that users can run regardless of whatever operating system or Web browser their computer uses.
The "must-carry" injunction would have required the Redmond, Washington-based software giant to include Sun's Java technology in its Windows XP operating system until the lower court can rule on a lawsuit filed by Sun accusing Microsoft of anticompetitive practices.
Sun's case is one of four private antitrust lawsuits after another federal judge ruled that Microsoft acted as an illegal monopoly based on its dominance in desktop operating systems, in a lawsuit filed by the Justice Department and 18 states.
Sun, based in Santa Clara, California, argued that Microsoft engaged in "anticompetitive acts against the Java platform and Sun with the purpose and effect of maintaining its monopoly over Intel-compatible PC operating systems."
In its ruling Thursday, the appeals court cited the district court's failure to find "immediate irreparable harm."
However, the court upheld U.S. District Judge J. Frederick Motz in "prohibiting Microsoft from distributing products that infringe Sun's copyright interests."
Lee Patch, vice president for legal affairs for Sun Microsystems, said the ruling affirming the copyright infringement injunction "confirms that Microsoft violated our prior settlement agreement, and that it did so in a way that continued to fragment the Java platform on PCs."
He said the company regrets that the decision on the other injunction will prolong its antitrust case against Microsoft.
Microsoft spokesman Jim Desler said the company was pleased with the ruling.
"This is another step in a long legal process and we consider it to be a positive step," he said.
On the copyright infringement finding, he noted that the company has already started phasing out distribution of Microsoft's version of Java technology.
"Our focus really has been to move beyond these conflicts and to work collaboratively with the rest of the industry," he said.