The announcement of the settlement came as testimony began in the damages phase of a trial in Manhattan that had already determined MP3.com willfully violated copyrights.
U.S. District Judge Jed S. Rakoff announced the deal in court after lawyers completed 48 hours of intensive negotiations.
Hadrian Katz, Universal's lawyer, declined to comment outside court.
In a joint statement issued by the companies, Universal President Zach Horowitz said the company had "pursued this case to send a strong message that copyrights will be protected and that copyright owners and artists need to be properly compensated for their work."
"It was never our intent to put MP3.com out of business with a judgment so large that it would threaten their viability as a company," he said. "We support the development of legitimate music businesses on the Internet."
MP3.com chief executive Michael Robertson, looking weary but happy, said his company had secured rights to Universal's entire catalog of music for use on its MyMP3.com listening service.
The service allows customers to hear CDs from anywhere once they prove they own them by inserting them into a computer.
Under the deal, Universal agreed to buy warrants for the rights to buy MP3.com shares.
"Our shareholder's should be excited about today's development," Robertson said. "It really moves us forward. It gets us out of the courtroom and into the business of delivering digital music."
Shares of MP3.com rose 63 cents, or 18 percent, to $4 on the Nasdaq Stock Market.
Earlier, MP3.com had settled with the other four large record companies Warner Music Group, BMG, EMI and Sony Music Entertainment and had arranged licensing deals with each of them.
The amount of those settlements has not been disclosed, but Robertson said the total, including Universal, falls within the $170 million the company set aside for legal costs.
Some lawsuits with smaller labels remain to be resolved but were not expected to be a threat to MP3.com's ability to stay in business.
The lawsuits were filed after MP3.com created an online catalog of 80,000 CDs for its MyMP3.com listening service.
Judge Rakoff ruled in September that MP3.com had intentionally violated the copyrights of the music companies. He had awarded Universal $25,000 per CD, but the number of CDs at stake was yet to be determined. Universal said it was up to 10,000 CDs making MP3.com potentially liable to pay up to $250 million in damages. MP3.com maintained the number of CDs involved was less than 5,000.
Hilary Rosen, president of the Recording Industry Association of Amrica, said the deal between Universal and MP3.com will "drive home the point that the marketplace for legitimate music on the Internet really works."
"Record companies are not only willing, but eager to enter into marketplace deals," she added.
Another purveyor of music over the Internet, Napster Inc., remains mired in a copyright infringement lawsuit. Napster, whose software enables consumers to swap digital files, is awaiting a federal appeals court ruling on whether it can continue operating, pending trial in a lawsuit filed by the recording industry.
Earlier in the month, Napster cut a deal with the music division of German media giant Bertelsmann AG to develop a membership-based digital distribution system.
Napster remains in talks with three of the four other major record labels Sony, EMI and Universal although its negotiations with Warner Music Group have broken down.
While the lawsuit filed by the recording industry could stop Napster from offering unlicensed music, it is unlikely to stem the illicit trading of bootlegs.