Question: what season and episode does elena leave?
Answer: She left at the end and last episode of Season 6 episode 22. The show continued for two more seasons. Nina Dobrev returned in the final season in the very last episode the shows finale season 8 episode 22 and reprises her role as Katherine and Elena.