As the group split up after the huge fight between Gatsby, Tom and Daisy, they drive different cars back to Tom's house on Long Island. As they are racing home, Gatsby and Daisy are in a big yellow car that Tom normally drove. Daisy is actually driving but they are going very fast, trying to get away from the painful nature of their fight.
But Myrtle sees the car and thinks that it is Tom and she races out to try and flag him down, probably hoping to escape with him since Wilson has found out about her affair and is planning to leave to go West with her. Instead she is hit by the yellow car and killed and Tom comes across the body in the street as they are following Gatsby.