Robert Norman, 54, was found guilty of committing misconduct in a public office while working at Belmarsh, home to a number of high-profile prisoners.
He was paid more than Â£10,000 for 40 tips to reporter Stephen Moyes between 2006 and 2011, the Old Bailey heard.
Norman of Swanscombe, Kent said he was highlighting problems at the prison.
The court heard that when he was arrested in 2013 he maintained he had acted in the public interest as a whistleblower.
But jailing him, the Common Serjeant of London, Richard Marks QC, said that was not his sole motivation.
"I am quite prepared to accept you did have genuine concerns about the manner in which the prison was run," he said.
"In particular having regard to budgetary cuts, and that in part was a motivating factor in acting as you did."
But he added: "That does not, in my judgment, tell the whole story. On a number of occasions you disclosed information where the public interest had nothing at all to do with what you were imparting.
"In my judgment there were other factors at play here. The first was indubitably the money.
"Secondly, it is apparent from the evidence that you had developed an intense dislike for the governor, who you considered inept at her job."
The judge said he had decided on an immediate custodial sentence because of the "scope and scale of the offending", but had reduced the term from 30 months to 20 after hearing that Norman is the sole carer for his sick wife.
A former prison officer has been jailed for 20 months for selling stories to a reporter working at the Daily Mirror and News of the World.