Riley, who plays Kyle Slater in the BBC one show, is the first actor to land a transgender role of its kind in a British soap.
The 22-year-old joined the cast of EastEnders last year but he is looking forward to trying his hand at new roles.
Speaking to Metro, Riley said: "When I landed a six-month contract at EastEnders it was a dream come true. For that to be extended to a year was something I never expected.
"However, as the time comes for Kyle to depart Walford I am looking forward to taking on new roles and who knows, Kyle may find his way back to Walford one day."
Riley's character Kyle first arrived in Albert Square in October 2015. Despite his arrival initially being mysterious, it was later revealed he is Stacey Slater's half brother.
The actor, who will bow out of EastEnders in the coming months, has received huge acclaim and even topped The Independent On Sunday's Rainbow List of influential, openly LGBT people in the UK.
An EastEnders spokesman has confirmed Riley's exit.
For exclusive competitions and amazing prizes visit Reveal's Facebook page NOW!