Whitworth, who was appointed chairman on an interim basis in April last year, has been a member of the Board since 2011. His resignation will be effective July 16.
Details of Whitworth's ailment were not disclosed.
He will also take a leave of absence from his investment company, Relational Investors, which he co-founded in 1996.
The HP board of directors will discuss appointing a new chairman at its next board meeting, HP said in a statement.
"Ralph has been a friend and close advisor to me, the HP leadership team and every member of the board for nearly three years. He has been a wonderful contributor to our efforts to turn HP around," HP President and CEO Meg Whitman said.
Relational Investors, in a statement said, Whitworth's duties at the firm will be assumed by co-founder David Batchelder and other members of the senior management team.
"Relational remains fully committed to serving its clients' interests and wishes Ralph and his family all the best at this difficult time. Out of respect for Ralph's privacy, the firm is not providing any additional information," it added.