The actress will appear in the "Chapter 58: In Memoriam" episode, kicking off the new season of the teen drama in October (2019).
The news was announced during Comic-Con in San Diego, California on Sunday, July 21, but no details about Doherty's character were revealed.
Perry, who portrayed Fred Andrews on the hit show, died in March after suffering a stroke.
The season 4 opening episode will feature a major tribute to the actor and his character.
"This year our 'Riverdale' family, and we are family..., suffered a huge, huge loss," executive producer Roberto Aguirre-Sacasa told fans at Comic-Con, ahead of introducing the cast and a filmed tribute to Perry, screened at the season 3 wrap party. The video ended with a photo of Perry and the words "We love you Luke."
Aguirre-Sacasa also told the crowd that Perry had discussed inviting his "Beverly Hills, 90210" castmate and friend Doherty to join the "Riverdale" cast.
Meanwhile, Shannen will be a part of an upcoming TV cast reunion as part of the debut of "BH90210" on August 7. The new show also features Jason Priestley, Jennie Garth, Ian Ziering, Gabrielle Carteris, Brian Austin Green and Tori Spelling.