Jim Flaherty is leaving the federal cabinet after more than eight years as finance minister to prepare for a return to the private sector, saying the move is unrelated to his recent health problems.