The tech company acquired the software when it bought the smartphone maker Palm for $1.2bn (£767m) last year.
HP used the code to power its short-lived range Touchpad tablet computers before it abandoned the product line.
The firm said it would continue investing in the project to help third parties add enhancements.
"By contributing this innovation, HP unleashes the creativity of the open source community to advance a new generation of applications and devices," said the firm's president and chief executive, Meg Whitman.
A statement from the company said it would make the underlying code behind WebOS available under an open source licence. It said third-party developers, partners and HP's own engineers could then "deliver ongoing enhancements and new versions into the marketplace".
The firm added that it intended to be "an active participant and investor in the project".
Analysts said the decision secured the platform's future, at least in the short to medium term.
"Given how successful HP was in selling off their tablet computers cheaply when they scrapped the platform we always suspected there would be some sort of u-turn," said Chris Green, principal technology analyst at Davies Murphy Group Europe.
"However we still don't think it will become a major platform to rival Google's Android and Apple's iOS. It will appeal to many generic tablet makers out there - but its long term future will probably be to power HP printers, and other peripheral devices."
Colin Gillis, senior tech analyst at BGC Partners, said HP had ultimately missed an opportunity to disrupt the market with a line of mobile computers powered by its own software.
"The real winner here is Microsoft," he said.
"It no longer has to contend with what would have been another viable operating system as it prepares to launch its Windows 8 tablets."
Source BBC News Technology