In a unanimous decision, 10 jurors agreed that Oracle had failed to prove its claims that Google infringed on Java software patents in the Android operating software for smartphones and tablet computers.
The jury verdict derailed Oracle's quest to get more than a billion dollars in damages from Google.
Oracle accused Google of infringing on Java computer programming language patents and copyrights Oracle obtained when it bought Java inventor Sun Microsystems in a $7.4 billion deal in 2009.
Google has denied the claims and said it believes mobile phone makers and other users of its open-source Android operating system are entitled to use the Java technology in dispute.
Google unveiled the free Android operating system, which is widely used for mobile devices around the world, two years before Oracle bought Sun.
Lead Google attorney Robert Van Nest said, "We are grateful for the jury's verdict," as he left the San Francisco courtroom.
Oracle spokeswoman Deborah Hellinger said the company presented "overwhelming evidence" that Google "knew it would fragment and damage Java."
"We plan to continue to defend and uphold Java's core... and ensure it is protected for the nine million Java developers and the community that depend on Java compatibility," she said in a statement.
Jurors deliberated for nearly seven days in what US District Court Judge William Alsup said was longer than the time taken by jurors in any other civil trial he has presided over.
All jurors but one quickly sided with Google in the patent portion of deliberations, said 52-year-old juror Greg Thompson, who described himself as the lone holdout during deliberations.
"I eventually had to conclude the preponderance (of evidence requirement) hadn't been met even, though I could see strong value in Oracle's argument," he said.
"I think that a lot of us had an underlying feeling that something wasn't quite right about what Google did but within the confines of how we had to make our decision we weren't able to make it fit in a manner that came to a decision."
A copyright phase of the trial ended earlier this month with the same jury ruling that Google's Android operating system violated Java copyrights but deadlocked on whether it constituted "fair use" of the technology.
Thompson said he was one of three jurors who doubted whether Google's use of the copyrighted Java code was proper.
Jury selection was pivotal to the outcome, with technology-savvy members of the panel tough to convince to back a ruling that might "limit future expansion of what is seen as the common good of products," Thompson said.
If Google's use of copyrighted Java application programming interfaces (APIs) in Android was fair use, Oracle would deserve no damages from the Mountain View, California-based firm under the law.
The copyright verdict limited any damages Oracle could potentially win to a small amount allowed by law, at most. The verdict in the patent phase meant Google was liable for no damages in that regard.
Alsup canceled a planned damages phase of the trial and sent the jury home on Wednesday.
"I think it is fair to call the present result a near disaster for Oracle," said Stanford University law school teaching fellow Brian Love.
"In a case that started with potentially billions on the line, Oracle's maximum recovery right now might not be enough to cover two days worth of its attorneys' fees."
Google has asked for a new trial on the copyright portion of the case.
Adding to the complexity of the case, Alsup early on reserved the right to make the ultimate decision whether application programming interfaces (APIs) at issue in the first phase of the trial can even be copyrighted.
The judge could rule as early as next week.
Oracle's challenge of Google in court over copyrights was an unusual tactic being watched intently in Silicon Valley.
In the fast-paced land of Internet innovation, it has been common for software writers to put their own spins on APIs that mini-programs use to "talk" to one another.
The jury concluded that Google infringed on 37 copyrighted APIs but it also agreed that Google demonstrated that it was led to believe it did not need a license for using Java.
Julie Samuels of the Electronic Frontier Foundation said the case was a huge waste of resources in trying to copyright these tools.
"After spending what certainly amounts to tens of millions of dollars... both parties will have wasted untold resources that could have been dedicated to innovation instead," she said.
"It's a sad commentary on the state of intellectual property litigation that we even had to go down this road."
What the stars mean:
★ Poor ★ ★ Promising ★★★ Good ★★★★ Very good ★★★★★ Exceptional