Reece Govan and Bran Gallacher attacked Marc McDermott in Cumbernauld.
The High Court in Glasgow heard that Mr Govan had targeted Mr McDermott with a shotgun and Mr Gallacher had a machete.
However, Michelle Butler who was a dog walker ended up getting caught in the crossfire. Her pet dog ended up being struck with 25 shotgun pellets and she suffered from a hand injury.
Mr McDermott had survived the attack but needed treatment.
Both Mr Govan and Gallacher had been due to stand in trial but both admitted to the attempted murder and Mr Govan also admitted to shooting the gun that struck Ms Butler and her dog.
Mr Gallacher had also been previously been jailed for 10 years in 2015 and was also involved in the killing of Stephen McGinaly in 2014. Mr Govan was also previously convicted and jailed in August 2016.
Both men are currently in remand and will be sentenced next month.