Inclusion Criteria:  Having signed informed consent. Age 18 to 70 years old. Histologically confirmed esophageal squamous carcinoma Immunohistochemistry confirmed EGFR(3+) or EGFR-FISH-amplification or next generation sequencing confirmed EGFR-amplification. Computed tomography (CT) or magnetic resonance imaging (MRI) confirmed unresectable metastasic or recurrent ESCC. Refractory or intolerant to at least one regimen. Measurable disease according to the Response Evaluation Criteria In Solid Tumors (RECIST) 1.1 criteria(diameter of the lesion should be more than 10mm by spiral CT or MRI, more than 20mm by common CT, the date of image should be less than 21 days before enrollment) Life expectancy of ≥3 month Eastern Cooperative Oncology Group (ECOG) 0-2 WBC>3,000/mm3, absolute neutrophil count ≥1500/mm3, platelet>100,000/mm3, Hb>9g/dl，Bilirubin level < 1.5 times ULN，Serum creatinine <1.5 times ULN，ALT and AST<2.5 times ULN ，AKP < 2.5 times ULN ，(≤5 times ULN in patients with liver metastases)(within 7 days before enrollment) No sever complication, such as active gastrointestinal bleeding, perforation, jaundice, obstruction, non-cancerous fever>38℃. Good compliance  Exclusion Criteria:  Currently receiving other effective regimens. Previous anticipate other clinical trial within 4 weeks before entering this study. No measurable lesions, eg. pleural fluid and ascites. With other malignancy within 5 year, except non-melanoma skin cancer and cervical carcinoma in situ. Heart failure or other sever organ dysfunction, eg. coronary artery disease, myocardial infarction within the last 6 months. Mentally abnormal or disable cognition,including central nervous system (CNS) metastasis. HIV infection, active hepatitis B or hepatitis C. Unstable systemic diseases such as poorly controlled diabetes. Interstitial lung disease, such as interstitial pneumonia, pulmonary fibrosis, or evidence of interstitial lung disease showed in X-ray/CT. Keratitis, ulcerative keratitis or severe dry eye syndrome. Known hypersensitivity to study drug. Pregnancy or lactation period. Active severe infection within 14 days Contraindications of afatinib. Pregnancy (determined by serum β-chorionic gonadotropin test) or breast-feeding Gastrointestinal perforation and/or fistula occurred within 3 months before enrollment Patients with active autoimmune disease or stable disease with high risk of recurrence Use corticosteroids (dose of prednisone or similar drugs> 10mg/day) or other immunosuppressive agents within 14 days before enrollment Live vaccine was injected within 4 weeks before enrollment Previously received treatment with EFFR-TKI