Derek Doherty (52), of Vicarstown, Ballymahon, Co Longford, was sentenced to 80 months in prison with the final 17 months suspended following a sitting of Longford Circuit Court.
Last year his son Nathan (23) was jailed for six years, with the final three suspended, for his involvement in the same attack. The DPP is currently appealing that sentence.
Derek Murphy was attacked after Derek Doherty and his son Nathan found him with Derek Doherty's wife, Sharon, on June 3, 2018 at a house in Colehill, Co Longford.
During interviews with gardaí, Derek Doherty said his wife had previously had an affair with his nephew.
In court, it emerged that Sharon Doherty and her friend Genette Freeman had met with Derek Murphy earlier that night.
Mr Shane Geraghty, barrister for the State, told the court: "Nathan had gone around the back of the house and observed his mother in a state of undress, while Derek banged on the door. He could see through the glass of the door and, down the hallway, he saw his wife standing naked in the hallway.
"Nathan came around and disclosed to his dad what he had seen and Derek continued banging on the door," the court was told.
Derek Murphy, in his statement to gardai, said that he was lying on his chest when "two lads" came straight through the door and "leapt on him", with one of them shouting "give it to him, give it to him".
He added that he ended up in "a wrestling match" with the two men and received a number of punches and kicks.
He turned on his side to try to defend himself but was pushed off the bed and pinned between the bed and the radiator.
He said the light was then switched on in the room and he could see his attackers "as plain as day" and that he felt things "being broken across his back" and all the time the punches and kicks kept coming.
The court heard that Derek Doherty had Derek Murphy in a headlock and reached down to grab him by his genitals and was pulling and squeezing his penis and testicles while shouting "do the b*****d, do the b*****d" at his son.
"The injured party describes he was fighting for his life and that the young man was behind him and had already hit him with a stick," said Mr Geraghty.
"He was using one hand to try to pull Derek Doherty's hand away from him while the younger man was trying to put a stick of some sort into his anus, and he used his other hand to try and stop him.
"He said he thought his life was ending. He couldn't stop him and Nathan forced the stick into his anus, pulled it out and forced it in again and left it inside him.
"He said the assault came to a stop then and they walked around the room before the older man drew the boot on him," said Mr Geraghty.
When they left, Derek Murphy pulled the object, which turned out to be a curtain pole, from his anus. Emergency services and gardai arrived a short time later and he was brought to Mullingar Hospital before being transferred to the Mater Hospital in Dublin.
Derek Murphy's horrific injuries resulted in him having to have a colostomy bag for 16 months.
He said in his victim impact statement that the men were like "two starved animals" and his "screams of intolerable pain" didn't stop them.
He said the crime left him in "a very dark place for a very long time" and added that he will not engage with strangers, particularly women.
Derek Doherty took to the stand to read a letter of apology he had written to the injured party.
"I can't begin to explain how sorry I am that I had hurt you in any way," he said. "I have accepted my guilt. I wish I could turn back the clock and undo the harm I caused you."
Passing judgement, Judge Comerford said that this was "spontaneous and horrific behaviour" and that Derek Doherty, while not the one holding the curtain pole, was the more culpable of the two because of his relationship to the co-accused.
"This was a truly tragic night for so many people involved - particularly the victim who met with a woman who he thought was not entangled with anyone," said the judge.