Juliet took a sleeping potion, and when Romeo sees her, he thinks she is dead, so he kills himself and dies first. He doesn’t want to continue living without her. Juliet then wakes up and figures out that Romeo is dead, and then she ends her own life.