Nigel Harper was in his late teens in 1975 when he was babysitting.
The 57-year-old,who worked as a barman in a social club in Wolverhampton, abused the boy before ordering him not to tell anyone or he would 'be in trouble'.
Harper, of Ingleby Gardens, Whitmore Reans, was convicted of raping a child under 13 after trial last June.
Judge Amjad Nawaz said: "This was an offence committed against a young child.
"The serious aggravating feature in this case, apart from the age of your victim, is that you were in a position of trust.
"You were babysitting the child. You were experimenting. You told him that you were playing a game that involved removing clothes."
The court then heard the graphic details of his abuse.
Mr Nawaz added: "You stopped when you realised you were doing something wrong. But you told him not to tell anybody or he would be in trouble.
"This offence happened in 1975. I have factored in that you were young yourself when you committed this offence."
Defence solicitor Simon Hanns told the judge: "A letter has been received from his doctor.
"The report makes mention of problems with his knee. He also has serious heart problems and had a heart attack a few years ago.
"Prior to his conviction he was of previous good character.
"He has a settled home address with his wife and two children.
"He maintains he is not guilty of this offence, but he has prepared himself for his inevitable sentence.
"This is a very historic offence, it happened 40 years ago.
"He was 16 or 17 when he committed this offence, so he was somewhat younger and less mature."
Mr Nawaz said: "The victim has had to resort to seeing a counsellor.
"It has taken him significant courage to tell the authorities about this. He has been left affected by this. Only a custodial sentence will be appropriate."