The Beatles set up record label Apple Corps in 1968
Sir Paul McCartney, Ringo Starr and the families of George Harrison and John Lennon control the Apple Corps label.
They claimed the US firm broke a deal aimed at ensuring there would not be two Apples in the music industry.
But Mr Justice Anthony Mann ruled that the computer company used the Apple logo in association with its store, not the music, and so was not in breach.
The ruling means iPods and iTunes will still be able to carry the Apple name and logo.
With great respect to the trial judge, we consider he has reached the wrong conclusion
Neil Aspinall
Apple Corps
Mr Justice Mann ruled iTunes was "a form of electronic shop" and not involved in creating music.
"I conclude that the use of the apple logo ... does not suggest a relevant connection with the creative work," he wrote in his judgment.
"I think that the use of the apple logo is a fair and reasonable use of the mark in connection with the service, which does not go further and unfairly or unreasonably suggest an additional association with the creative works themselves."
Apple Corps must pay its rival's legal bill, estimated at £2m, but the judge refused an interim payment of £1.5m pending further hearings.
Exclusive rights
The record label said the rise of iTunes broke an agreement the two sides hammered out in 1991 after their last dispute.
That deal gave the record label exclusive rights to use the apple trademark for the record business, Geoffrey Vos QC, representing Apple Corps, told the court.
Apple Computer, whose products helped launch the personal computer industry, was founded in 1976 and its logo is an apple with a section removed from the side.
We have always loved The Beatles, and hopefully we can now work together to get them on the iTunes Music Store
Steve Jobs
Apple Computer
Apple Corps manager Neil Aspinall said: "With great respect to the trial judge, we consider he has reached the wrong conclusion.
"We felt that during the course of the trial we clearly demonstrated just how extensively Apple Computer had broken the agreement.
"We will accordingly be filing an appeal and putting the case again to the Court of Appeal."
Apple Computer chief executive Steve Jobs said: "We are glad to put this disagreement behind us.
"We have always loved The Beatles, and hopefully we can now work together to get them on the iTunes Music Store."
The launch of the iPod, a portable digital music player, in 2001, and its iTunes music store two years later, prompted the latest battle.
Court download
About three million songs are downloaded from the service every day.
Tracks by The Beatles have not been licensed for downloading and are not available on the service.
Mr Vos demonstrated how to use iTunes during the hearing - downloading Chic's 1978 disco hit Le Freak in the courtroom.
He pointed out to Mr Justice Mann how many times the Apple logo appeared on the computer screen as he went through the process.
The Beatles' label Apple Corps lost its court case against Apple Computer today in the High Court. Apple Corps argued that the iTunes Music Store was a breach of the 1991 settlement reached between the two parties. The 1991 agreement was that Apple Computer would not sell music branded with an apple. Mr Justice Anthony Mann agreed with Apple Computer's defence that, while the iTunes Music Store is branded, the music it sells is not - "I conclude that the use of the Apple logo ... does not suggest a relevant connection with the creative work." During the case Apple Corps showed the court just how many times the Apple Computer logo appeared during a typical download. The song purchased during the demonstration was Le Freak by Chic.

After the case closed Apple Computer CEO Steve Jobs extended an invitation to the record label, "we have always loved the Beatles, and hopefully we can now work together to get them on the iTunes Music Store". Apple Corps have decided to take the case to the Court of Appeal. Speaking for Apple Corps, manager Neil Aspinall said, "with great respect to the trial judge, we consider he has reached the wrong conclusion."