Mark Coulburn, 30, of HMP Garth, Walton Lane, Leyland, was given a minimum tariff of six years.
He refused to leave his cell to attend court and the sentence was passed in his absence by Judge Philip Parry.
He was also convicted of unauthorised possession of a weapon in prison.
Preston Crown Court was told both Mr Moriarty and Coulburn would not give an account to police.
During the trial Bob Golinski, prosecuting, told the jury the victim suffered a number of puncture wounds to his body on July 27, at around 4.15pm, as the pair queued at a ‘treatment hatch’ for medication.
Footage of the incident was caught on the prison’s CCTV system.
A prison officer saw Coulburn pushing Moriarty, before “striking out” a number of times, with a “jabbing motion”.
He followed him and found him leaning on a sill next to an open window.
Two officers found a sharpened metal bale with a blue tapped handle on the concrete flooring outside.
The home made weapon was dry, despite it raining that day, and a DNA profile found on it matched Coulburn’s.
Moriarty suffered several small puncture wounds to his upper left side and right shoulder blade, and a more serious wound on his lower left back which bled profusely.
A life sentence means Coulburn, who is still serving a jail term for another violent offence, will be subject to that sentence for the rest of his life.
When a life term is imposed, the offender will only be released once they have served the minimum term set, and only if the Parole Board is sure that detaining the offender is no longer necessary to protect the public.
If released, a defendant serving a life sentence will remain on licence for the rest of their life, which means they may be recalled to prison at any time if they are considered by the authorities to be a risk to the public - even if they have not actually committed another criminal offence.