Hardaker was a surprise omission from Castleford's Super League Grand Final squad for last weekend due to "a breach of team rules", the Tigers going down 24-6 to Leeds Rhinos at Old Trafford.
The RFL has revealed a sample taken from the 2017 Man of Steel nominee after the Super 8s match between Castleford and Leeds last month returned an adverse finding.
As a result, Hardaker has been handed a provisional suspension and will not form part of Wayne Bennett's England squad for the World Cup.
An RFL spokesperson said: "The Rugby Football League can confirm that Zak Hardaker is provisionally suspended from all competition after it received notification from UK Anti-Doping that he had tested positive for a banned substance following a Super 8s game between Castleford Tigers and Leeds Rhinos on September 8, 2017.
"He will therefore not be considered for the England Rugby League World Cup squad due to be announced today [Monday] at 12pm [local time]."
England assistant coach Denis Betts alluded to the fact Hardaker would not be available, ruing his absence after an impressive year in Super League.
"He's been the form full-back in the competition. He was pivotal to how Castleford played this year," Betts told the BBC.
"He's a fantastic rugby league player and he would have been fantastic for us."
England will play joint-host Australia in its World Cup opener on 27 October, with matches against Lebanon and France to follow.