HP said its shareholders would own a stake in both businesses through a tax-free transaction next year, the details of which still needed to be worked out.
Each business contributes about half of HP's revenue and profit.
Shares of the 75-year-old company, which has struggled to adapt to the new era of mobile and online computing, were up 4 percent at $36.60 in early trading on Monday.
A spinoff of the PC business was last proposed in 2011 by then-Chief Executive Leo Apotheker as the company struggled in the highly competitive PC market. HP later ditched the plan - and Apotheker, replacing him with current CEO Meg Whitman.
"Make no mistake, one HP was the right thing to do to begin the turnaround of this company," Whitman said on a conference call. "But now ... this is definitely the right tactic."
HP said it planned to cut 5,000 more jobs as part of its multi-year restructuring, raising the total under Whitman to 55,000. The company currently has more than 300,000 employees.
The separation will result in a fundamental reshaping of one of technology's most important pioneers, which is on track to generate $112 billion in revenue in the fiscal year this month.
Many investors and analysts had called for a break-up of the company, or a sale of the PC business, so that HP could focus on the more profitable operations that sell computer servers and networking gear and data storage to businesses.
"Shareholders will now be able to invest in the respective asset groups without the fear of cross-subsidies and inefficiencies that invariably plague large business conglomerates," Ralph Whitworth, former HP chairman and founder of Relational Investors LLC, said in a statement.
Relational owns a 1.49 percent stake in HP, which has a market value of almost $70 billion.
HP is the latest in a line of companies, often under shareholder pressure, to spin off operations in an attempt to become more agile and capitalize on faster-growing businesses.
Online auction company eBay Inc, which was formerly run by Whitman, said last week it would spin off electronic payment service PayPal.
Whitman to lead the enterprise
Whitman will lead the new Hewlett-Packard Enterprise, which will house the corporate hardware and services operations.
Current lead independent director Patricia Russo will be chairman of the enterprise company.
HP's printing and personal computing business, to be known as HP Inc, will be led by Dion Weisler, currently an executive in that division. Whitman will be chairman of HP Inc.
Founded by Bill Hewlett and Dave Packard in a Palo Alto, California garage in 1939, HP was one of the companies that shaped Silicon Valley and the PC revolution.
Goldman Sachs & Co served as financial adviser to HP, while Wachtell, Lipton, Rosen and Katz served as legal adviser.© Thomson Reuters 2014
For the latest tech news and reviews, follow Gadgets 360 on X, Facebook, WhatsApp, Threads and Google News. For the latest videos on gadgets and tech, subscribe to our YouTube channel. If you want to know everything about top influencers, follow our in-house Who'sThat360 on Instagram and YouTube.