Graham, 21, was given an out-of-competition test by UK Anti-Doping on February 17, the eve of the 2015 season.
The suspension applies until March 10, 2019.
Graham, who previously played for Huddersfield, made 11 appearances for the Cougars in 2014 when they were relegated to Kingstone Press League 1 from the Championship.
'Our aim is to try and get more girls and women into rugby league' - Jason Robinson
UKAD's director of operations Pat Myhill said: "Athletes are solely responsible for any banned substance which is found in their system, regardless of how it got there or whether there was an intention to cheat or not.
"Under the 2015 World Anti-Doping Code, the sanction for a deliberate doping offence has now increased from two to four years.
"Lewis Graham is a young player who has been banned from playing sport for a considerable amount of time.
"This case highlights that all athletes, regardless of level, must be aware, and understand, the risks to their sporting careers if they test positive. They must ensure they manage that risk at all times."
Rugby World Cup postponed until 2022 after New Zealand and Australia withdrawals
Rudge: St Helens did rugby league 'proud' by winning maiden Challenge Cup title
Share this article