Shotgun pellets were found in the damaged front door of the house on Kentmere Road, Seacroft, after the shooting just before 7.30am on January 11, Leeds Crown Court heard.
Armed police arrested 25-year-old Connor Hennigan at the wheel of a Mercedes after a short car chase around an hour later.
Hennigan, of Foundry Lane, Seacroft, was jailed for six years after admitting possessing a firearm and dangerous driving.
His 19-year-old accomplice, Liam Clough, of Tarnside Drive, Seacroft, was jailed for five-years-and-three months after admitting possessing a firearm.
Graham O'Sullivan, prosecuting, said Hennigan was driving a Mercedes car belonging to a family friend.
But Hennigan didn't know the car was fitted with a tracking device, which police were able to access and find out where it had been and at what times on the day of the shooting.
Mr O'Sullivan said Hennigan picked Clough up just after 6.30am on January 11 before driving to Kentmere Road, arriving at at 7.15am - the exact time a resident on the road heard a loud "boom."
The court heard Hennigan then drove the Mercedes to his grandparents' address on Rosgill Drive, Seacroft, before going on to Clough's home on Tarnside Avenue.
Later that day, police recovered the home-made 12 gauge single-barrelled gun from underneath a caravan parked outside Hennigan's grandparents' address on Rosgill Drive.
Officers also found spent shotgun cartridges and ammunition for the gun.
Clough's DNA was found on the gun's trigger and muzzle.
Hennigan has 27 previous convictions for 45 offences including affray, burglary, possession of drugs, assault a constable, battery and threatening behaviour.
Clough has five previous convictions for 17 offences including theft and criminal damage.
Craig Sutcliffe, for Hennigan, said: "It's an improvised weapon. It's described as home-made and uses shotgun cartridges.
"It's akin to a shotgun, rather than a weapon that could be used to cause even further harm."
Paul Hodgkinson, for Clough, said: "This was out of character for Mr Clough. This was a foolish and temporary foray into serious offending on his part."
Jailing the pair, Judge Christopher Batty said: "It was a potentially lethal weapon.
"That weapon was taken in the car that you were using Hennigan and you collected Clough for support.
"With two others, you went to a house and that firearm was discharged towards the front door."
Judge Batty also banned Hennigan from driving for five years.