Idris took a break from the sport in 2016 but returned with Wests Tigers this year, though an anterior cruciate ligament injury ended his season in May.
He featured for New South Wales in the opening game of the 2010 State of Origin series and his sole appearance for the Kangaroos came in the 2011 Anzac Test against New Zealand.
In a statement on his Instagram page, Idris wrote: "Thank you all for sharing this game and journey with me unfortunately due to injury it's ended my time at 27 in this great game.
"The game has given me so much, more than anything it has given me character a way to express myself and the ability to change the lives of others.
"I just want to thank everyone that has stood by me through the good times and the bad throughout my amazing time in the NRL, so thank you to my amazing family my awesome friends and the truly amazing fans that make the game what it is.
"Onto the next chapter, wherever that may be."