The decision upholds a ruling that allows Oracle to seek licensing fees for the use of some of the Java language. Google had said it should be able to use Java without paying a fee.
The case involves how much copyright protection should extend to Java. Google, which used Java to design its Android smartphone operating system, said in court papers that an Oracle victory would obstruct "an enormous amount of innovation" because software developers would not be able to build freely on each others' work.
The litigation now returns to a San Francisco federal court for more proceedings on Google's separate "fair use" defense.
"We will continue to defend the interoperability that has fostered innovation and competition in the software industry," Google said in a statement on Monday.
Oracle, however, has said effective copyright protection is the key to software development. General Counsel Dorian Daley said on Monday that the Supreme Court decision was a "win for innovation."
Google's Android operating system is the world's best-selling smartphone platform. Oracle sued Google in 2010 and is seeking roughly $1 billion (roughly Rs. 6,376 crores) on its copyright claims.
The case examined whether application programming interfaces, which connect programs, can be copyrighted.
A San Francisco federal judge decided that the Java APIs replicated by Google were not subject to copyright protection and were free for all to use. But the U.S. Court of Appeals for the Federal Circuit reversed that last year, saying it was bound to respect copyright protection for software "until either the Supreme Court or Congress tells us otherwise."
Shares of Google were down about 1.1 percent at $525.74 in early trading, while Oracle was down about 0.6 percent at $40.74.
The Obama administration, which was asked to weigh in on the issue earlier this year, asked the Supreme Court not to take the case. The administration said the dispute had raised important concerns about the effect that enforcement of Oracle's copyright could have on software development, but said those issues could be addressed via Google's fair use defense.
The case is Google v. Oracle, U.S. Supreme Court, No. 14-410.
© Thomson Reuters 2015