Zak Firth was jailed for six years over the raid at the property in Wakefield.
Leeds Crown Court heard Firth and the other man targeted the property as they mistakenly believed he had a large amount of cash in his home.
Carmel Pearson, prosecuting, said the victim was watching a film at home at 9.45pm on September 7 this year when he heard a faint knock at the door.
He opened the curtains to see a man stood at the door with his hood up.
Miss Pearson said the victim immediately became concerned and called the police.
Firth and the other man then went to the rear of the property and began kicking the door.
The victim took a knife from the kitchen as he was on the phone to the police.
The pair managed to force their way inside the house.
The victim ran to the front door to try to get out but did not have his keys.
Firth entered the living room holding a knife and said to the victim: "Come on, where is the money?"
The other robber went upstairs in search of cash and shouted: "Come on bro. You've got ten seconds."
The victim was still on the phone to the police during the incident and told the robbers that officers were nearly at his home.
The pair left empty handed.
Firth was later identified as one of the culprits during an identity procedure.
He pleaded guilty to attempted robbery.
The victim said in a statement to the court: "The whole incident made me in fear for my life.
"I was very scared and thought they were both going to attack me.
"I am not staying in my house after this incident because I will have to sleep with one eye open."
Firth, 22, of Monkhill Avenue, Pontefract, has 17 previous convictions, including ten for theft.
Stephen Swann, mitigating, said Firth agreed to take part in the offence to settle a drug debt.
Mr Swann said the men wrongly believed the victim had recently sold a business and kept cash from the sale in his home.