Jay Bell's actions on 26 July 2013 caused the infant to suffer brain bleeding, retinal haemorrhages and a broken rib and ankle.
As a result of the brain injury, the child suffers from cerebral palsy and is registered blind.
Bell, 23, from Mayfield in Dalkeith, last month admitted to two charges.
He pleaded guilty to culpable and reckless conduct towards the child to his severe injury, permanent impairment and to the danger of his life and a second charge of wilfully neglecting the baby and failing to seek medical attention for him.
Passing sentence at the High Court in Edinburgh on Thursday, judge Paul Arthurson QC described the offences as "extremely serious".
The baby did not receive hospital treatment for about two weeks and Bell took about five months to reveal what had happened to the child when he was in his care.
The court heard Bell threw the child in the air repeatedly but the baby hit his head on the wall, then hit a Moses basket and fell on the floor.
Bell then picked him up and shook him repeatedly until he began to cry.
The court heard the child was eventually admitted to the Royal Hospital for Sick Children on 10 August 2013 and it took Bell until December that year to disclose fully what had happened to the baby.
Had the child gone to hospital straight after suffering the brain injury, medical intervention may have limited the impact of that injury, the judge said.
Prosecutors accepted that while Bell's conduct was culpable and reckless, it lacked the "wicked intent" of an assault.
Defence counsel John Keenan said Bell never set out to harm the child.
He has shown remorse and is having "extreme difficulty" coming to terms with what happened, the solicitor advocate said.
The judge said Bell's culpability was at the lower end of the scale.
"I accept that while the consequences for the child were truly catastrophic, these were not intended by you," he told Bell.
"Nevertheless, taking into account your position of care and trust and the extreme vulnerability of the child, the only appropriate disposal for the offences is a substantial custodial one."
A Midlothian man who threw a baby in the air and shook him, causing him to suffer "catastrophic" injuries, has been jailed for four years.