Executive producer Roberto Aguirre-Sacasa made the announcement during the show's Comic-Con panel on Sunday (July 21).
Entitled 'Chapter Fifty-Eight: In Memoriam', the season 4 premiere will honour Luke Perry's legacy and the major impact his character, Fred Andrews, had on Riverdale.
The casting of Doherty continues her long association with Perry, which started in 1990 on Beverly Hills, 90210, and continued for nearly 30 years. Perry and Aguirre-Sacasa had long planned for Doherty to appear on Riverdale.
Her presence on the series "is something that Luke wanted to happen since season one", said Aguirre-Sacasa.
"They were such good friends, and when we were putting together this tribute episode, we wanted to make it as special as possible, and so we asked Shannen to do a pivotal, super-emotional role. She read the script and immediately said 'yes'. It's very impactful."
Earlier this month, the cast of Riverdale paid tribute to Perry as they began work on season four.
In a touching Instagram post, Mädchen Amick, who plays Alice Cooper, wrote: "There was nothing but love, memories and mourning for our beloved Luke as we honour him in our first episode back."
Perry sadly passed away in March this year after suffering a stroke at the age of 52.
Riverdale airs on The CW in the US and Netflix in the UK.
('You Might Also Like',)