The West Chamber had its origins in The Story of Yingying by Yuan Zhen of the Tang dynasty. In the original version Student Zhang first seduces Yingying, then abandons her.
西廂記原出於唐朝元稹的「鶯鶯傳」，當時的張生是始亂之，終棄之。