Leo Apotheker has been replaced as chief executive of Hewlett-Packard by Meg Whitman, the former head of eBay.
Mr Apotheker was in the job less than a year, but had overseen a collapse in the share price and a fall in sales.
Ms Whitman, who once ran for governor of California, resigned from eBay in 2008 and is credited with building it into a global force.
HP announced the departure after a board meeting, but there had been speculation for days about his future.
In a statement, Ray Lane, who was named executive chairman, said: “We are fortunate to have someone of Meg Whitman’s calibre and experience to step up to lead HP.
The board of Hewlett Packard has certainly made its mark in the annals of corporate government.
First it botched dealing with the misconduct allegations of Leo Apotheker’s predecessor. Then it hired a chief executive whose skills profile matched only about half of HP’s business.
When the new CEO discovered that all was not well in HP’s product pipeline, the board signed off his radical new strategy of transforming HP into a company focused on supplying complex hardware and software for enterprise clients instead.
As IBM demonstrated in the 1990s, both board and shareholders need vision, patience and strong nerves to pull off such a move. HP’s board has shown little evidence of either. Whatever the merits of Mr Apotheker’s strategy, to panic after less than two months of announcing fundamental change sows the seeds for even more confusion.
To top it all, the board’s choice of successor looks dubious at best. If Mr Apotheker was perceived to be lacking the necessary industry knowledge, Meg Whitman has even less experience running a business as complex as HP.
“We are at a critical moment and we need renewed leadership to successfully implement our strategy and take advantage of the market opportunities ahead.”
Ms Whitman, who had been a member of the HP board since January, said in a statement: “I am honoured and excited to lead HP. I believe HP matters – it matters to Silicon Valley, California, the country and the world.”
It is the second time in two years Mr Apotheker has been forced out of a top job. He stood down from German business software maker SAP last year, after less than a year as chief executive.
He took over HP after the departure of former boss Mark Hurd, who quit after a sexual harassment investigation.
The new chief replaced a third of the HP board, brought in Ms Whitman, announced plans to sell the personal computer division – the world’s largest – and bought UK software maker Autonomy for £7.1bn ($11.7bn).
But his strategy has failed to impress investors. HP’s shares have fallen 45.4% this year, making it one of the worst performers in the Dow Jones index of leading US companies.
HP’s shares closed down 4.8% at $22.80 on